Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
No, it doesn't work. To work, it not only needs to match when it should match, it needs to not mach when it shouldn't match. Yours fails to do the latter. /([^(stop)]+)/ is the same as /([^()opst]+)/. It doesn't look for "stop" at all, just individual characters. You basically took the regexp the OP said didn't work, and made it not work in more places. For example, your solution stops wherever a paren is encountered. In reply to Re^2: Tell regex to stop at "phrase", instead of char - how?
by ikegami
|
|