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
d
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
 
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&2&8
$txt='42 43';
$re1='(\\d)';	# Any Single Digit 1
$re2='.*?';	# Non-greedy match on filler
$re3='\\d+';	# Uninteresting: int
$re4='.*?';	# Non-greedy match on filler
$re5='(\\d+)';	# Integer Number 1
$re=$re1.$re2.$re3.$re4.$re5;
if ($txt =~ m/$re/is)
{
    $d1=$1;
    $int1=$2;
    print "($d1) ($int1) \n";
}
#-----
# Paste the code into a new perl file. Then in Unix:
# $ perl x.pl 
#-----
 
 
 
 
Feedback
Yois:: Pretty good!!!Thu, 24 Jul 2014 08:35AM
FAILURES:: Lol at all the failed attempts at SQL injection. Do you think this guy is a retard?Thu, 24 Jul 2014 01:14PM
:: good!Thu, 24 Jul 2014 07:32PM
mvrk:: Wow.. everyone should try this once. TIMTODIFri, 25 Jul 2014 08:18AM
jrich:: lmfao. check out all those dropped tablesFri, 25 Jul 2014 05:31PM
:: LoL at the person who tried to inject sql hereSat, 26 Jul 2014 04:53PM
:: Meka Patta Ooy. Maara Lesiy. Ela Kollek aaa...Sun, 27 Jul 2014 12:57AM
:: coolSun, 27 Jul 2014 01:27AM
Da Vinci:: Really artistic talentMon, 28 Jul 2014 10:49AM
Boss:: Nice!Mon, 28 Jul 2014 08:05PM
:: it chokes on some html tags, such as "", it actually formats the output of the answer instead of showing up as part of the regular expressionWed, 30 Jul 2014 07:24AM
:: Simply ExcellentWed, 30 Jul 2014 01:01PM
mk:: Thanks a million!Wed, 30 Jul 2014 11:38PM
baws:: dis is awesum m8s. Thu, 31 Jul 2014 08:22AM
:: Why not for URL?Thu, 31 Jul 2014 08:07PM
-1':: 1Fri, 1 Aug 2014 05:13PM
1:: 1Fri, 1 Aug 2014 05:13PM
-1':: 1Sat, 2 Aug 2014 04:36PM
1:: -1'Sat, 2 Aug 2014 04:36PM
1:: 1Sat, 2 Aug 2014 04:36PM
-1':: 1Sat, 2 Aug 2014 10:28PM
1:: -1'Sat, 2 Aug 2014 10:28PM
1:: 1Sat, 2 Aug 2014 10:29PM
1:: -1'Sat, 2 Aug 2014 11:44PM
1:: 1Sat, 2 Aug 2014 11:44PM
-1':: 1Sun, 3 Aug 2014 12:11AM
1:: -1'Sun, 3 Aug 2014 12:11AM
1:: 1Sun, 3 Aug 2014 12:11AM
-1':: 1Sun, 3 Aug 2014 11:54AM
1:: -1'Sun, 3 Aug 2014 11:54AM
1:: 1Sun, 3 Aug 2014 11:54AM
-1':: 1Sun, 3 Aug 2014 04:33PM
1:: -1'Sun, 3 Aug 2014 04:33PM
-1':: 1Sun, 3 Aug 2014 06:46PM
1:: -1'Sun, 3 Aug 2014 06:47PM
1:: -1'Sun, 3 Aug 2014 07:00PM
1:: 1Sun, 3 Aug 2014 07:00PM
1:: -1'Sun, 3 Aug 2014 09:24PM
1:: 1Sun, 3 Aug 2014 09:24PM
-1':: 1Mon, 4 Aug 2014 04:32AM
1:: 1Mon, 4 Aug 2014 04:33AM
-1':: 1Mon, 4 Aug 2014 04:46AM
1:: -1'Mon, 4 Aug 2014 04:46AM
1:: 1Mon, 4 Aug 2014 04:47AM
 
  home     faq              ©2006 mark james ennis