txt 2 re
knowing is obsolete :: regular expression generator (perl php python java javascript coldfusion c c++ ruby vb vbscript j# c# c++.net vb.net)
 
 
 
Enter the string that you want to use a regular expression on:
1
   
 
Select the elements that you want to extract to run regular expression generator:
2
4
c 4
d4
2
c 2
d2
day2
int
_
c _
ws_
4
c 4
d4
3
c 3
d3
day3
int
< Source String
What to click?  extract any integer in this position
extract this integer (2006) in this position
 
3VBScript regular expression program that extracts the selected elements from the entered string:
Perl PHP Python Java Javascript ColdFusion C C++ Ruby VB [VBScript] J#.net C#.net C++.net VB.net 
 
<!-- URL that generated this code: >
<!-- http://txt2re.com/index-vbscript.php3?s=42%2043&2&13&1 >

<%@ LANGUAGE="VBSCRIPT" %>
<%
  Dim txt
  txt ="42 43"

  Dim re1
  re1 ="(\d+)"	'Integer Number 1
  Dim re2
  re2 ="(.)"	'Any Single Character 1
  Dim re3
  re3 =".*?"	'Non-greedy match on filler
  Dim re4
  re4 ="\d+"	'Uninteresting: int
  Dim re5
  re5 =".*?"	'Non-greedy match on filler
  Dim re6
  re6 ="(\d+)"	'Integer Number 2

  Dim r
  Set r = New RegExp
  r.Pattern = re1+re2+re3+re4+re5+re6
  r.IgnoreCase = True
  Dim m
  Set m = r.Execute(txt)
  If m.Item(0).SubMatches.Count > 0 Then
      Dim int1
      int1=m.Item(0).SubMatches.Item(0)
      Dim c1
      c1=m.Item(0).SubMatches.Item(1)
      Dim int2
      int2=m.Item(0).SubMatches.Item(2)
      Response.Write("("+Replace(int1,"<","&lt;")+")"+"("+Replace(c1,"<","&lt;")+")"+"("+Replace(int2,"<","&lt;")+")"+"")
  End If
%>

<!------->
<!-- To run this code:-->
<!------->
<!-- .Paste into text file using notepad into IIS Web Server wwwroot directory.-->
<!------->
<!-- .Or if using Microsoft's development environment use 'paste as html' if available.-->
<!------->
 
 
 
 
Feedback
:: LoL at the person who tried to inject sql hereSat, 26 Jul 2014 04:53PM
:: Meka Patta Ooy. Maara Lesiy. Ela Kollek aaa...Sun, 27 Jul 2014 12:57AM
:: coolSun, 27 Jul 2014 01:27AM
Da Vinci:: Really artistic talentMon, 28 Jul 2014 10:49AM
Boss:: Nice!Mon, 28 Jul 2014 08:05PM
:: it chokes on some html tags, such as "", it actually formats the output of the answer instead of showing up as part of the regular expressionWed, 30 Jul 2014 07:24AM
:: Simply ExcellentWed, 30 Jul 2014 01:01PM
mk:: Thanks a million!Wed, 30 Jul 2014 11:38PM
baws:: dis is awesum m8s. Thu, 31 Jul 2014 08:22AM
:: Why not for URL?Thu, 31 Jul 2014 08:07PM
:: YAS!Tue, 5 Aug 2014 03:52PM
cheers:: big earsTue, 5 Aug 2014 03:52PM
Love it - :: Any change we could get output to a string like this: ^(?\d{1,3})-.+$Tue, 5 Aug 2014 06:23PM
good work:: neat toolThu, 7 Aug 2014 09:34AM
:: Simply AmazingThu, 7 Aug 2014 04:26PM
:: Very nice indeed!!Thu, 7 Aug 2014 04:55PM
Dave:: Thanks a bunch, works really well.Thu, 7 Aug 2014 04:58PM
ChampaKeChucheNirale:: Dhanyavad bhaiyaThu, 7 Aug 2014 05:06PM
:-o :):: amazin! thank you! please Add utf8 Unicode support, Like "Persian" languageThu, 7 Aug 2014 09:13PM
:::: asd@asdFri, 8 Aug 2014 08:38AM
asdf:: passabene frereFri, 8 Aug 2014 09:52AM
Berokor:: This tools helps me. tyFri, 8 Aug 2014 10:24AM
Pat:: I love you nowFri, 8 Aug 2014 08:00PM
dwenaus:: aaaaaamazing!!!!!Sat, 9 Aug 2014 04:05AM
D:: ThanksMon, 11 Aug 2014 09:57PM
:: knowing is obsolete Tue, 12 Aug 2014 11:20AM
Lim:: Thank uTue, 12 Aug 2014 12:30PM
Pacho:: Super!!!Tue, 12 Aug 2014 02:20PM
pwnubs:: hahahaha how many noobs trying to inject somethingWed, 13 Aug 2014 12:53AM
Atrinax:: Thanks a lot! You made my day!Thu, 14 Aug 2014 07:28AM
:: This is awsome Thu, 14 Aug 2014 04:54PM
:: superThu, 14 Aug 2014 08:09PM
:: excellentFri, 15 Aug 2014 09:30AM
:: Thanks a lot ! Helped me out with a very complex file-content validation !!Fri, 15 Aug 2014 01:49PM
alert(lol):: alert(lol)Fri, 15 Aug 2014 02:26PM
thanks!:: you rock dude.Fri, 15 Aug 2014 11:17PM
nufuqn:: dJzPNnjpYSat, 16 Aug 2014 09:09AM
::  Sat, 16 Aug 2014 02:53PM
::  Mon, 18 Aug 2014 07:58AM
url::  Mon, 18 Aug 2014 11:27AM
:: or 1=1Mon, 18 Aug 2014 04:09PM
Sanic:: Brilliant, thanks a lot mate.Tue, 19 Aug 2014 07:29AM
::  Tue, 19 Aug 2014 12:44PM
:: haxlolorlaoflaoTue, 19 Aug 2014 12:45PM
 
  home     faq              ©2006 mark james ennis