in reply to Re: Regex problem - (non)greedy?
in thread Regex problem - (non)greedy?
I expect that doesn't give the intended results for any of the following:
"cdghi" "cd ghi ghi"
Furthermore, that pattern won't help if we wants to go on to handle either of the following:
"cd XXX ghi cd YYY ghi" "cd XXX cd YYY ghi ZZZ ghi"
By the way, you really want to add a leading ^ to that to speed things up greatly when the pattern doesn't match.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Regex problem - (non)greedy?
by hdb (Monsignor) on Nov 14, 2013 at 14:34 UTC | |
by ikegami (Patriarch) on Nov 14, 2013 at 14:38 UTC | |
by hdb (Monsignor) on Nov 14, 2013 at 14:40 UTC | |
by ikegami (Patriarch) on Nov 14, 2013 at 14:44 UTC | |
by hdb (Monsignor) on Nov 14, 2013 at 14:47 UTC | |
|