[issue6797] When Beginning Expression with Lookahead Assertion I get no Matches

2009-08-29 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, MRAB! Closing as invalid. -- nosy: +marketdickinson resolution: -> invalid status: open -> closed ___ Python tracker ___ _

[issue6797] When Beginning Expression with Lookahead Assertion I get no Matches

2009-08-29 Thread Matthew Barnett
Matthew Barnett added the comment: "(?![a-z0-9])" is a negative lookahead, so "(?![a-z0-9])0" is saying that the next character shouldn't be any of [a-z0-9], yet it should match "0". Hence, no matches. -- nosy: +mrabarnett ___ Python tracker

[issue6797] When Beginning Expression with Lookahead Assertion I get no Matches

2009-08-28 Thread Jonathan Windle
New submission from Jonathan Windle : Example Code: import re re.findall(r"(?![a-z0-9])0(?![a-z0-9])", "a0a 0 0 b0b") The above code returns an empty list. I expect to get ['0', '0'] returned. If I remove "(?![a-z0-9])" from the beginning of the expression string findall returns values as expe