1. regex.e question
- Posted by Tom Apr 09, 2009
- 875 views
I expected identical results for this example. Why is it different?
include std/regex.e as re regex r r = re:new( "(abx|xyz) \\1" ) ? re:find_all( r, "abc abc" ) --{} r = re:new( #/(abc|xyz) \1/ ) ? re:find_all( r, "abc abc" ) -- | | { -- | | { -- abc abc {1,7}, -- abc {1,3} -- } -- } -- BAD results should be the same
using svn1889
Tom
2. Re: regex.e question
- Posted by jeremy (admin) Apr 09, 2009
- 868 views
Tom said...
I expected identical results for this example. Why is it different?
You have a minor typo...
Tom said...
include std/regex.e as re regex r r = re:new( "(abx|xyz) \\1" ) r = re:new( #/(abc|xyz) \1/ )
I put the back to back so you can spot it easier. First is abx|xyz, second is abc|xyz which is what I think you really meant.
Jeremy