Why no RE match of A AND B?

Tim Peters tim.one at comcast.net
Wed Mar 5 03:16:27 CET 2003


[Anders J. Munch]
> It's [regexp intersection] useful in combination with complement ("it's
> a .*day but not a Sunday").

If that's the use case, it's more an argument for adding a difference
operator (like R-S = the strings matched by R less the strings matched by
S).

> But then complement is probably too spooky for most people.

Python has negative lookahead assertions now -- but I'm not sure I've ever
seen them used <wink>.






More information about the Python-list mailing list