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
 4
d4
2
c 2
d2
day2
int42
_
c 
ws_
4
c 4
d4
3
c 3
d3
day3
int43
< Source String
What to click?  extract any integer in this position
extract this integer (2006) in this position
 
3Perl 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 
 
#!/usr/bin/perl

# URL that generated this code:
# http://txt2re.com/index.php3?s=42%2043&-13&10

$txt='42 43';

$re1='(4)';	# Any Single Character 1
$re2='.*?';	# Non-greedy match on filler
$re3='.';	# Uninteresting: c
$re4='.*?';	# Non-greedy match on filler
$re5='(.)';	# Any Single Character 2

$re=$re1.$re2.$re3.$re4.$re5;
if ($txt =~ m/$re/is)
{
    $c1=$1;
    $c2=$2;
    print "($c1) ($c2) \n";
}

#-----
# Paste the code into a new perl file. Then in Unix:
# $ perl x.pl 
#-----
 
 
 
 
Feedback
Chuck::  Tue, 19 May 2015 01:50PM
::  Tue, 19 May 2015 02:10PM
:: sWed, 20 May 2015 06:49AM
:: alert(Vulnerable Site); Wed, 20 May 2015 08:48AM
:: hey no alert anymore !! nice !Wed, 20 May 2015 08:48AM
::  Wed, 20 May 2015 09:21AM
::  Wed, 20 May 2015 09:48AM
....:: yooloWed, 20 May 2015 01:18PM
::  Wed, 20 May 2015 01:18PM
::  Wed, 20 May 2015 01:18PM
::  Wed, 20 May 2015 01:18PM
::  Wed, 20 May 2015 04:41PM
:: alert(Vulnerable Site);Thu, 21 May 2015 04:54AM
::  Thu, 21 May 2015 10:16AM
:: alert(Vulnerable Site);Thu, 21 May 2015 10:45AM
::  Thu, 21 May 2015 02:37PM
::  Thu, 21 May 2015 02:49PM
:: ===============3Thu, 21 May 2015 02:49PM
::  Thu, 21 May 2015 02:50PM
::  Thu, 21 May 2015 04:10PM
::  Thu, 21 May 2015 04:11PM
Jesus:: 8============DThu, 21 May 2015 07:36PM
::  Thu, 21 May 2015 09:27PM
::  Thu, 21 May 2015 11:35PM
::  Fri, 22 May 2015 02:47AM
::  Fri, 22 May 2015 03:09AM
:::: alert("Script ran!");Fri, 22 May 2015 11:28AM
Al Capone:: I Was HereFri, 22 May 2015 12:05PM
:: alert("Hello")Fri, 22 May 2015 01:46PM
:: alert("Script ran!");Fri, 22 May 2015 02:23PM
::  Fri, 22 May 2015 02:31PM
::  Fri, 22 May 2015 04:13PM
:: Nice :-) Where to donate the million? Is this open source? :)Fri, 22 May 2015 04:22PM
323:: weweFri, 22 May 2015 06:51PM
::  Fri, 22 May 2015 09:39PM
:: Is the source availableFri, 22 May 2015 11:59PM
::  Sat, 23 May 2015 10:18PM
::  Sat, 23 May 2015 11:19PM
d:: dSun, 24 May 2015 11:56AM
::  Sun, 24 May 2015 02:48PM
:: alert(Vulnerable Site);Sun, 24 May 2015 02:48PM
::  Mon, 25 May 2015 09:48AM
::  Mon, 25 May 2015 10:05AM
, 'AAAksBAAEAAAacbAAN'::  Tue, 26 May 2015 03:40AM
 
  home     faq              ©2006 mark james ennis