Issue6797
Created on 2009-08-28 21:49 by jwindle, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg92046 - (view) | Author: Jonathan Windle (jwindle) | Date: 2009-08-28 21:49 | |
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 expected. |
|||
| msg92063 - (view) | Author: Matthew Barnett (mrabarnett) * ![]() |
Date: 2009-08-29 12:15 | |
"(?![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. |
|||
| msg92064 - (view) | Author: Mark Dickinson (mark.dickinson) * ![]() |
Date: 2009-08-29 13:07 | |
Thanks, MRAB! Closing as invalid. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:52 | admin | set | github: 51046 |
| 2009-08-29 13:07:34 | mark.dickinson | set | status: open -> closed nosy:
+ mark.dickinson resolution: not a bug |
| 2009-08-29 12:15:38 | mrabarnett | set | nosy:
+ mrabarnett messages: + msg92063 |
| 2009-08-28 21:49:57 | jwindle | create | |

