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
8
c 8
d
8
c 8
d
8
c 8
d
day8
int888
-
c -
8
c 8
d
8
c 8
d8
8
c 8
d
day8
int888
signed_int-888
-
c -
8
c 8
d
8
c 8
d
8
c 8
d
8
c 8
d
day8
int8888
signed_int-8888
< Source String
What to click?  extract any integer in this position
extract this integer (2006) in this position
 
3Javascript 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-javascript.php3?s=888-888-8888&9&10&11&12&14&15&17&18&16 -->

<html>
  <body>
    <script language=javascript>
      var txt='888-888-8888';

      var re1='(\\d)';	// Any Single Digit 1
      var re2='(\\d)';	// Any Single Digit 2
      var re3='(\\d)';	// Any Single Digit 3
      var re4='.*?';	// Non-greedy match on filler
      var re5='(\\d)';	// Any Single Digit 4
      var re6='.*?';	// Non-greedy match on filler
      var re7='\\d';	// Uninteresting: d
      var re8='.*?';	// Non-greedy match on filler
      var re9='(\\d)';	// Any Single Digit 5
      var re10='.*?';	// Non-greedy match on filler
      var re11='(\\d)';	// Any Single Digit 6
      var re12='(\\d)';	// Any Single Digit 7
      var re13='(\\d)';	// Any Single Digit 8
      var re14='(\\d)';	// Any Single Digit 9

      var p = new RegExp(re1+re2+re3+re4+re5+re6+re7+re8+re9+re10+re11+re12+re13+re14,["i"]);
      var m = p.exec(txt);
      if (m != null)
      {
          var d1=m[1];
          var d2=m[2];
          var d3=m[3];
          var d4=m[4];
          var d5=m[5];
          var d6=m[6];
          var d7=m[7];
          var d8=m[8];
          var d9=m[9];
          document.write("("+d1.replace(/</,"&lt;")+")"+"("+d2.replace(/</,"&lt;")+")"+"("+d3.replace(/</,"&lt;")+")"+"("+d4.replace(/</,"&lt;")+")"+"("+d5.replace(/</,"&lt;")+")"+"("+d6.replace(/</,"&lt;")+")"+"("+d7.replace(/</,"&lt;")+")"+"("+d8.replace(/</,"&lt;")+")"+"("+d9.replace(/</,"&lt;")+")"+"\n");
      }
    </script>
  </body>
</html>

<!-- -->
<!-- Paste the code into a file that can be served by your web server -->
<!-- or into a local file that can be read by your browser -->
<!-- -->
 
 
 
 
Feedback
Anil:: Awesome!! Just what I wanted. Great job. Thank you !!!Tue, 16 Dec 2014 09:23AM
dsds:: PO BoxWed, 17 Dec 2014 11:29AM
::  Wed, 17 Dec 2014 10:44PM
::  Wed, 17 Dec 2014 10:44PM
xerxe6:: coolThu, 18 Dec 2014 03:06PM
:: stupid cuntsFri, 19 Dec 2014 02:04PM
:: Goodlike Tool!Fri, 19 Dec 2014 04:13PM
:: Godlike Tool!Fri, 19 Dec 2014 04:13PM
:: This tool is irreplaceable. Thank you.Fri, 19 Dec 2014 05:55PM
pnyayqquayw:: SfXibsZefmNNGkMon, 22 Dec 2014 12:39AM
::  Mon, 22 Dec 2014 05:29AM
859::  Mon, 22 Dec 2014 08:50AM
859::  Mon, 22 Dec 2014 08:50AM
dfw:: fMon, 22 Dec 2014 09:58AM
Anthelion:: Great tool! Cheers!Mon, 22 Dec 2014 12:14PM
ryixixg:: qJgMeMcLSTue, 23 Dec 2014 06:59AM
::  Tue, 23 Dec 2014 11:18AM
Edison Bustos:: One of the best web tools ...Thanks... and Happy Holydays!Tue, 23 Dec 2014 02:39PM
::  Tue, 23 Dec 2014 04:03PM
Okieman:: Best regex generator I've found so far; rock on!Wed, 24 Dec 2014 01:58AM
:: dsfdsfWed, 24 Dec 2014 05:57AM
::  Wed, 24 Dec 2014 06:30AM
sun2:: Nice tool. thx!Wed, 24 Dec 2014 11:24AM
::  Wed, 24 Dec 2014 07:26PM
::  Thu, 25 Dec 2014 04:15AM
pqxcawapm:: rAsERYsfgLTdtkSThu, 25 Dec 2014 05:58AM
Dan:: Saved me a lot of times!Thu, 25 Dec 2014 04:14PM
Dan:: Saved me a lot of times!Thu, 25 Dec 2014 04:19PM
Dan:: Saved me a lot of times!Thu, 25 Dec 2014 04:20PM
::  Thu, 25 Dec 2014 04:21PM
::  Thu, 25 Dec 2014 04:22PM
pioshate:: thanksThu, 25 Dec 2014 04:25PM
::  Thu, 25 Dec 2014 04:25PM
::  Thu, 25 Dec 2014 04:25PM
issac:: thanks ~ its a cool toolsFri, 26 Dec 2014 06:45PM
:: AmazingFri, 26 Dec 2014 11:28PM
::  Fri, 26 Dec 2014 11:52PM
::  Sat, 27 Dec 2014 03:24AM
::  Sat, 27 Dec 2014 08:47AM
::  Sat, 27 Dec 2014 10:48AM
:: :)Sat, 27 Dec 2014 10:49AM
::  Sat, 27 Dec 2014 10:49AM
test:: testing what happendSat, 27 Dec 2014 05:19PM
::  Sun, 28 Dec 2014 04:10PM
 
  home     faq              ©2006 mark james ennis