Why no RE match of A AND B?
Rene Pijlman
reply.in at the.newsgroup
Sun Mar 2 19:31:52 EST 2003
Erik Max Francis:
>"Anders J. Munch" wrote:
>> 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
But OTOH there are notational shortcuts in the usual RE
languages. For example:
a+ == aa*
r{3,5} == rrrr?r?
So what makes the intersection different?
--
René Pijlman
More information about the Python-list
mailing list