Re:Show HN: my regular expression example match generator
by nuclear_eclipse on Friday September 24, 2010 @06:41PM
(#1725684)
Congrats on supporting back-references :)
Hint: Try using "1(0+)1\1" or "([a-zA-Z]+)\1" for some nifty examples of things that technically aren't possible with true regular expressions, but are supported by enhanced regex engines like Perl/PCRE.
Edit: too bad it only works with one back reference, eg, adding \2 apparently breaks everything, returning no matches and no code.
Edit2: after more playing, it seems that using \3 works as a backref for the second matching group... try "(a+)(b+)\1\3"...
Hint: Try using "1(0+)1\1" or "([a-zA-Z]+)\1" for some nifty examples of things that technically aren't possible with true regular expressions, but are supported by enhanced regex engines like Perl/PCRE.
Edit: too bad it only works with one back reference, eg, adding \2 apparently breaks everything, returning no matches and no code.
Edit2: after more playing, it seems that using \3 works as a backref for the second matching group... try "(a+)(b+)\1\3"...