Why no RE match of A AND B?

Erik Max Francis max at alcyone.com
Mon Mar 3 01:13:55 CET 2003

"Anders J. Munch" wrote:

> It can always be reformulated as an expression without an intersection
> ('&') operator.  But not necessarily a simpler one.
> I've never understood either why the intersection operator is usually
> missing from regular expression implementations.  Tradition?

Probably for the reason you mention:  It can easily be reexpressed as
another regular expression, whether simpler or more complicated.  That
isn't true in general, for, say, the | regular expression operator

 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ All the people in her neighborhood turn around and get mad and sing
\__/ Public Enemy
    CSBuddy / http://www.alcyone.com/pyos/csbuddy/
 A Counter-Strike server log file monitor in Python.

More information about the Python-list mailing list