in reply to Re: Look-Arounds in Regexes are Hard (Common Use of a Negative Lookahead)
in thread Look-Arounds in Regexes are Hard
There's just a minor point of bikeshedding: should it be (?s:.) instead of a simple dot?
I can argue both ways: negated character classes include the newline (unless it's explicitly listed as excluded), and it becomes more predictable that way.
On the other hand you gain more flexibility if respect the /s setting of the outer regex, allowing the caller to tweak its behaviour accordingly.
The first point sounds more convincing to me, but I have to think a bit more about it.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Look-Arounds in Regexes are Hard (Common Use of a Negative Lookahead)
by ikegami (Patriarch) on Jul 24, 2009 at 16:56 UTC |