in reply to Multiple regex matches in single string
You can use a negative lookahead to achieve the affect you are after
/( start # match start (?: # followed by . # anything (?!start) # not followed by start )+? # but match as little as possible end # until there is an end )/gisx
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Multiple regex matches in single string
by Elijah (Hermit) on Apr 26, 2008 at 16:23 UTC | |
by johngg (Canon) on Apr 26, 2008 at 22:22 UTC | |
by hipowls (Curate) on Apr 26, 2008 at 23:33 UTC |