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
4
2
c 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
 
3Cold Fusion 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-cf.php3?s=42%2043&2&10&-8 -->

<html>
  <body>
    <cfset txt='42 43'>

    <cfset re1='(4)'>	<!-- Any Single Digit 1-->
    <cfset re2='.*?'>	<!-- Non-greedy match on filler-->
    <cfset re3='.'>	<!-- Uninteresting: c-->
    <cfset re4='.*?'>	<!-- Non-greedy match on filler-->
    <cfset re5='(.)'>	<!-- Any Single Character 1-->
    <cfset re6='(\d+)'>	<!-- Integer Number 1-->

    <cfset re = #re1#&#re2#&#re3#&#re4#&#re5#&#re6#>
    <cfset m = #REFindNoCase(#re#,#txt#,1,"TRUE")#>
    <cfif #ArrayLen(m.pos)# gt 1>
        <cfset d1=#Mid(txt,m.pos[2],m.len[2])#>
        <cfset c1=#Mid(txt,m.pos[3],m.len[3])#>
        <cfset int1=#Mid(txt,m.pos[4],m.len[4])#>
        <cfoutput>
          (#replace(d1,"<" ,"&lt;")#)(#replace(c1,"<" ,"&lt;")#)(#replace(int1,"<" ,"&lt;")#)
        </cfoutput>
    </cfif>
  </body>
</html>

<!-- -->
<!-- Paste the code into a file that can be served by your cold fusion web server -->
<!-- -->
 
 
 
 
Feedback
:: GreatThu, 9 Oct 2014 02:41AM
Fred:: I'm just in love with that toolThu, 9 Oct 2014 10:40AM
Moin:: I dont care succees joke its coolThu, 9 Oct 2014 10:46PM
Wander:: muito bomFri, 10 Oct 2014 03:16AM
CVirus:: life saviorSat, 11 Oct 2014 08:13PM
Mintpal-JRWR:: Amazing Tooll, Never not use this tool!Sat, 11 Oct 2014 08:22PM
observer:: Really really really amazing toooool. thank you very muchSun, 12 Oct 2014 12:29PM
regexxer:: Great , thx dude you are number oneMon, 13 Oct 2014 09:05AM
:: Works perfect with python.. Thanks to Dev team.Tue, 14 Oct 2014 01:57PM
Vivek Sharma:: Works perfect with python.. Thanks to Dev team.Tue, 14 Oct 2014 01:58PM
Hallo:: PommesTue, 14 Oct 2014 04:32PM
Hi:: Was able to drop it into notepad++'s regex search, thanks !Tue, 14 Oct 2014 09:24PM
Jo:: Thanks a lot!! It's very useful.Wed, 15 Oct 2014 03:55AM
Me:: i can't find phone number :/Wed, 15 Oct 2014 02:53PM
:: i can,t find img urlFri, 17 Oct 2014 02:26AM
G.Uzunov:: Thanks, very intuitive and usefulSat, 18 Oct 2014 09:27AM
baboomerang:: thanks alot dude! Such a life saverMon, 20 Oct 2014 02:37AM
:: in the example "14:18:30 and 13 rooms" the num 13 room doesnt becomes int '13' because of time has hour hh greater than 12 . can some one helpTue, 21 Oct 2014 02:52AM
:: this site has saved me so much time for years, i'd be in trouble if it ever went away, thank youTue, 21 Oct 2014 06:45PM
:: Very useful. Would it also be possible to support regexes for (1) unix/linux utilities sed and grep and (2) Visual studio regexes?Tue, 21 Oct 2014 09:18PM
:: Feature request: Allow user to supply a list of strings, and for txt2re to generate a single regex that would match them all. Thanks,Tue, 21 Oct 2014 09:22PM
:: Feature request: Allow user to supply a list of strings, and for txt2re to generate a single regex that would match them all. Thanks,Tue, 21 Oct 2014 09:28PM
Jamie:: Thank you! Great tool. I forgot even the basics of regex and this tool helped me out.Wed, 22 Oct 2014 03:03PM
Anon:: Fucking awesome.Wed, 22 Oct 2014 04:48PM
rafay:: Thankyou, saved alot of my time, excellent tool!Fri, 24 Oct 2014 03:56PM
anon:: It was unreasonable of me to think it'd be able to handle a 11k line 3D array...Sun, 26 Oct 2014 10:11PM
::  Tue, 28 Oct 2014 09:07AM
5566:: goodTue, 28 Oct 2014 09:07AM
::  Tue, 28 Oct 2014 01:55PM
ninja:: GREAT TOOL! THANK YOU!Tue, 28 Oct 2014 01:55PM
jesus:: Thx. It's a miracle function.Wed, 29 Oct 2014 01:16AM
jadeon:: what a nice program!Wed, 29 Oct 2014 05:08AM
elagzbqv:: TicLWLdSYMPGVbsSXWed, 29 Oct 2014 10:54AM
::  Wed, 29 Oct 2014 11:07AM
:: Very nice...!Wed, 29 Oct 2014 11:07AM
::  Thu, 30 Oct 2014 03:32AM
:: LulzThu, 30 Oct 2014 08:23AM
:: Yay!Thu, 30 Oct 2014 08:23AM
::  Thu, 30 Oct 2014 08:23AM
:: Excellent toolThu, 30 Oct 2014 08:31AM
::  Thu, 30 Oct 2014 08:50AM
SOMEONEINHONGKONG:: CRAP CREATOR DID NOT UNDERSTAND A THING!!!!!Thu, 30 Oct 2014 08:51AM
:: Very nice...!Thu, 30 Oct 2014 09:29AM
:: sddsddaThu, 30 Oct 2014 11:28AM
 
  home     faq              ©2006 mark james ennis