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
1
c 1
d1
9
c 9
d9
2
c 2
d2
day2
.
c .
1
c 1
d1
6
c 6
d6
8
c 8
d8
day8
.
c .
1
c 1
d1
0
c 0
d0
day10
.
c .
1
c 1
d1
1
c 1
d1
day11
float10.11
ddmmyy8.10.11
yymmdd68.10.11
ipaddress
_
c _
ws_
-
c -
_
c _
ws_
b
c b
wb
o
c o
wo
b
c b
wb
varbob
word
_
c _
ws_
[
c [
1
c 1
d1
6
c 6
d6
day16
/
c /
M
c M
wM
a
c a
wa
r
c r
wr
usstatear
varMar
wordMar
monthMar
/
c /
2
c 2
d2
0
c 0
d0
0
c 0
d0
9
c 9
d9
day09
year2009
unixpath/Mar/2009
ddmmmyyyy
:
c :
1
c 1
d1
3
c 3
d3
day13
:
c :
1
c 1
d1
4
c 4
d4
day14
:
c :
1
c 1
d1
5
c 5
d5
day15
_
c _
ws_
-
c -
0
c 0
d0
8
c 8
d8
0
c 0
d0
0
c 0
d0
day00
signed_int-0800
]
c ]
sbraces[16/Mar/2009:13:14:15_-0800]
_
c _
ws_
"
c "
G
c G
wG
E
c E
wE
T
c T
wT
varGET
wordGET
_
c _
ws_
/
c /
g
c g
wg
i
c i
wi
b
c b
wb
b
c b
wb
s
c s
ws
vargibbs
wordgibbs
.
c .
g
c g
wg
i
c i
wi
f
c f
wf
vargif
wordgif
filegibbs.gif
fqdngibbs.gif
unixpath/gibbs.gif
_
c _
ws_
H
c H
wH
T
c T
wT
T
c T
wT
P
c P
wP
varHTTP
wordHTTP
/
c /
1
c 1
d1
day1
.
c .
0
c 0
d0
day0
float1.0
unixpath/1.0
"
c "
string"GET_/gibbs.gif_HTTP/1.0"
_
c _
ws_
2
c 2
d2
0
c 0
d0
0
c 0
d0
day00
_
c _
ws_
5
c 5
d
6
c 6
d
4
c 4
d
8
c 8
d
day8
< 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=192.168.10.11%20-%20bob%20[16/Mar/2009:13:14:15%20-0800]%20%22GET%20/gibbs.gif%20HTTP/1.0%22%20200%205648&3&23&4&100&103&98&106 -->

<html>
  <body>
    <script language=javascript>
      var txt='192.168.10.11 - bob [16/Mar/2009:13:14:15 -0800] "GET /gibbs.gif HTTP/1.0" 200 5648';

      var re1='((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(?![\\d])';	// IPv4 IP Address 1
      var re2='.*?';	// Non-greedy match on filler
      var re3='((?:[a-z][a-z]+))';	// Word 1
      var re4='.*?';	// Non-greedy match on filler
      var re5='((?:(?:[0-2]?\\d{1})|(?:[3][01]{1}))[-:\\/.](?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:tember)?|Sept|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)[-:\\/.](?:(?:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3})))(?![\\d])';	// DDMMMYYYY 1
      var re6='.*?';	// Non-greedy match on filler
      var re7='\\d';	// Uninteresting: d
      var re8='.*?';	// Non-greedy match on filler
      var re9='\\d';	// Uninteresting: d
      var re10='.*?';	// Non-greedy match on filler
      var re11='\\d';	// Uninteresting: d
      var re12='.*?';	// Non-greedy match on filler
      var re13='\\d';	// Uninteresting: d
      var re14='.*?';	// Non-greedy match on filler
      var re15='\\d';	// Uninteresting: d
      var re16='.*?';	// Non-greedy match on filler
      var re17='\\d';	// Uninteresting: d
      var re18='.*?';	// Non-greedy match on filler
      var re19='\\d';	// Uninteresting: d
      var re20='.*?';	// Non-greedy match on filler
      var re21='\\d';	// Uninteresting: d
      var re22='.*?';	// Non-greedy match on filler
      var re23='\\d';	// Uninteresting: d
      var re24='.*?';	// Non-greedy match on filler
      var re25='\\d';	// Uninteresting: d
      var re26='.*?';	// Non-greedy match on filler
      var re27='\\d';	// Uninteresting: d
      var re28='.*?';	// Non-greedy match on filler
      var re29='\\d';	// Uninteresting: d
      var re30='.*?';	// Non-greedy match on filler
      var re31='\\d';	// Uninteresting: d
      var re32='.*?';	// Non-greedy match on filler
      var re33='\\d';	// Uninteresting: d
      var re34='.*?';	// Non-greedy match on filler
      var re35='\\d';	// Uninteresting: d
      var re36='.*?';	// Non-greedy match on filler
      var re37='(\\d)';	// Any Single Digit 1
      var re38='(\\d)';	// Any Single Digit 2
      var re39='(\\d)';	// Any Single Digit 3
      var re40='(\\d)';	// Any Single Digit 4

      var p = new RegExp(re1+re2+re3+re4+re5+re6+re7+re8+re9+re10+re11+re12+re13+re14+re15+re16+re17+re18+re19+re20+re21+re22+re23+re24+re25+re26+re27+re28+re29+re30+re31+re32+re33+re34+re35+re36+re37+re38+re39+re40,["i"]);
      var m = p.exec(txt);
      if (m != null)
      {
          var ipaddress1=m[1];
          var word1=m[2];
          var ddmmmyyyy1=m[3];
          var d1=m[4];
          var d2=m[5];
          var d3=m[6];
          var d4=m[7];
          document.write("("+ipaddress1.replace(/</,"&lt;")+")"+"("+word1.replace(/</,"&lt;")+")"+"("+ddmmmyyyy1.replace(/</,"&lt;")+")"+"("+d1.replace(/</,"&lt;")+")"+"("+d2.replace(/</,"&lt;")+")"+"("+d3.replace(/</,"&lt;")+")"+"("+d4.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
::  Thu, 19 Mar 2015 12:17PM
Àíäğåé Âèêòîğîâè÷::  Thu, 19 Mar 2015 01:02PM
::  Thu, 19 Mar 2015 08:45PM
:: thank youFri, 20 Mar 2015 09:58AM
::  Fri, 20 Mar 2015 02:13PM
Kuntal:: You saved my Day thanks a lot!!!!!!!!!!!!!Fri, 20 Mar 2015 02:14PM
::  Fri, 20 Mar 2015 02:19PM
::  Fri, 20 Mar 2015 04:08PM
::  Fri, 20 Mar 2015 08:28PM
::  Sat, 21 Mar 2015 03:12AM
::  Sat, 21 Mar 2015 01:34PM
::  Sat, 21 Mar 2015 01:34PM
::  Sat, 21 Mar 2015 02:32PM
gzzibs:: bXOkEmMoEHAImzBrHNUSat, 21 Mar 2015 02:34PM
::  Sat, 21 Mar 2015 06:57PM
mkijhdpqffd:: FxuQzZLVbSun, 22 Mar 2015 05:09AM
::  Sun, 22 Mar 2015 07:59PM
::  Mon, 23 Mar 2015 03:27AM
::  Mon, 23 Mar 2015 06:51AM
:: Perfect!! alias Stefan S.Mon, 23 Mar 2015 10:23AM
someone:: Help me alot!Mon, 23 Mar 2015 10:36AM
regexer:: very cool very swag i liek itMon, 23 Mar 2015 03:08PM
Yolo:: $wagMon, 23 Mar 2015 05:04PM
daaaamn dude:: thank a lot broMon, 23 Mar 2015 08:16PM
::  Mon, 23 Mar 2015 10:56PM
::  Mon, 23 Mar 2015 10:56PM
::  Tue, 24 Mar 2015 05:05AM
::  Tue, 24 Mar 2015 07:48AM
::  Tue, 24 Mar 2015 12:40PM
sad:: asdasTue, 24 Mar 2015 12:40PM
asdf:: dsafasdfTue, 24 Mar 2015 12:40PM
sülüman:: Nabıyonuz gençlerTue, 24 Mar 2015 03:08PM
sülüman:: Nabıyonuz gençlerTue, 24 Mar 2015 03:09PM
::  Wed, 25 Mar 2015 06:31AM
:: Awesome!Wed, 25 Mar 2015 06:31AM
::  Wed, 25 Mar 2015 08:28AM
::  Wed, 25 Mar 2015 08:36AM
1337:: Awesome, would donate if a button would be there. Wed, 25 Mar 2015 02:27PM
::  Thu, 26 Mar 2015 06:02AM
::  Thu, 26 Mar 2015 09:02AM
::  Thu, 26 Mar 2015 09:12AM
:: uselessThu, 26 Mar 2015 09:13AM
111:: 22222222888888Fri, 27 Mar 2015 03:29AM
::  Fri, 27 Mar 2015 03:30AM
 
  home     faq              ©2006 mark james ennis