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 
d4
2
 2
d2
day2
int42
_
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&-11 >

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

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

  Dim r
  Set r = New RegExp
  r.Pattern = re1+re2+re3+re4
  r.IgnoreCase = True
  Dim m
  Set m = r.Execute(txt)
  If m.Item(0).SubMatches.Count > 0 Then
      Dim c1
      c1=m.Item(0).SubMatches.Item(0)
      Dim c2
      c2=m.Item(0).SubMatches.Item(1)
      Dim int1
      int1=m.Item(0).SubMatches.Item(2)
      Response.Write("("+Replace(c1,"<","&lt;")+")"+"("+Replace(c2,"<","&lt;")+")"+"("+Replace(int1,"<","&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
Chew:: Hi! Thanks for the useful tool! Just one thing: try using your csv option when the csv terms are enclosed in quotes and there's a comma inside any of them...Thu, 4 Sep 2014 10:17AM
:: extremely confusing interface. Cannot figure out how to use this. Writing regex myself is easier.Thu, 4 Sep 2014 03:20PM
:: excellentFri, 5 Sep 2014 03:09PM
:: Muchas gracias por publicar tu trabajo :DFri, 5 Sep 2014 03:37PM
Genesio:: too clever! :-)Fri, 5 Sep 2014 04:12PM
:: It's fucking useful!Sat, 6 Sep 2014 05:11AM
Al:: EhhhhhhMon, 8 Sep 2014 03:48PM
Howl:: Awesome.Tue, 9 Sep 2014 06:19PM
What:: Happened Thu, 11 Sep 2014 09:32AM
in :: Chicago on this day?Thu, 11 Sep 2014 09:33AM
Thank you:: Thank youThu, 11 Sep 2014 10:34AM
I:: Love herThu, 11 Sep 2014 10:34AM
amil:: eman reh siThu, 11 Sep 2014 11:42AM
m:: wow this is sick!Thu, 11 Sep 2014 02:30PM
swagoverflow:: simply the bestFri, 12 Sep 2014 07:01AM
dmitry:: that a cool tool thanks :)!Sat, 13 Sep 2014 09:48PM
:: It compares character by character and does not give any generic result.. so basically REGEX given by u is specific to that particular string..Tue, 16 Sep 2014 08:08AM
Geek AK:: ArgentinaaWed, 17 Sep 2014 04:53AM
ET:: Saved my dayWed, 17 Sep 2014 07:37AM
Brazilian Guy:: Don't work for me.Wed, 17 Sep 2014 08:31PM
Paul:: Brilliant! Bookmarked. :o)Fri, 19 Sep 2014 04:23PM
MarkyMark:: Please add Powershell as a languageFri, 19 Sep 2014 09:40PM
mo:: works perfectly for javaSat, 20 Sep 2014 01:07PM
Lawrence:: Amazing tool. Thanks!Tue, 23 Sep 2014 12:19PM
linux_user:: Can you please add support fro C++ using Qt?Tue, 23 Sep 2014 08:01PM
javauser:: how does this work?Thu, 25 Sep 2014 08:32PM
::  Fri, 26 Sep 2014 10:45AM
Pranav:: Amazing! Fri, 26 Sep 2014 01:41PM
::  Fri, 26 Sep 2014 02:00PM
uxzanechvof:: ZvOYnOOIbeLlxfddASat, 27 Sep 2014 12:27PM
Iannos:: Brilliant ideaSat, 27 Sep 2014 01:57PM
Totom3:: Love it, thanks so much :DSun, 28 Sep 2014 04:54AM
'or '1'='1' --'::  Sun, 28 Sep 2014 04:19PM
::  Sun, 28 Sep 2014 08:54PM
asd:: marked as failure correctMon, 29 Sep 2014 11:58AM
 ::::  Mon, 29 Sep 2014 02:04PM
 ::  Mon, 29 Sep 2014 02:04PM
::  Mon, 29 Sep 2014 02:17PM
Universal5:: Thank you! You saved me quite some time and a headache. :-)Mon, 29 Sep 2014 07:27PM
:: thank you!! well done! very usefulTue, 30 Sep 2014 05:05AM
:: Thats great sirTue, 30 Sep 2014 05:57AM
Андрей Викторович::  Tue, 30 Sep 2014 11:54AM
::  Wed, 1 Oct 2014 11:07AM
Ricktza:: Perfect.Wed, 1 Oct 2014 12:03PM
 
  home     faq              ©2006 mark james ennis