regexp non-greedy matching bug?
Fredrik Lundh
fredrik at pythonware.com
Sun Dec 4 06:23:56 EST 2005
More information about the Python-list mailing list
Sun Dec 4 06:23:56 EST 2005
- Previous message (by thread): regexp non-greedy matching bug?
- Next message (by thread): regexp non-greedy matching bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Mike Meyer wrote: > ^ must match the beginning of the string (BTW, you can get the same > behavior by leaving off the ^ and using search instead of match). that's backwards, isn't it? using ^ with match is usually pointless (since match only looks at the first position anyway), and using ^ with search is also usually pointless... (the only time you really need ^ is in certain multiline searches; depending on what flags you use, ^ can match not only at the beginning of a string, but also after each newline character in the target string) </F>
- Previous message (by thread): regexp non-greedy matching bug?
- Next message (by thread): regexp non-greedy matching bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list