[Python-Dev] Re: pre-PEP [corrected]: Complete, Structured Regular Expression Group Matching (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Mon Aug 23 13:41:26 CEST 2004
- Previous message: [Python-Dev] Re: pre-PEP [corrected]: Complete, Structured Regular Expression Group Matching
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Mike Coleman wrote:
>>> parse("hello 1 2 3 4 # 5", "(\w+)", "\s*(\d+)") ('hello', ['1', '2', '3', '4'], ' # 5') No offense, but this code makes me cringe. The "|." trick seems like a horrific hack
"or any other character" a horrific hack? that's RE 101, really.
and you're supposed to use the code, not stare at the implementation. programming is all about abstractions, remember?
- Previous message: [Python-Dev] Re: pre-PEP [corrected]: Complete, Structured Regular Expression Group Matching
- Next message: [Python-Dev] Re: Call for defense of @decorators
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]