Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
blowski
· 13y ago · 0 comments
Ctrl + F shows two. Time to update your regex-fu, or use simpler tools.
Comments
[–]
lengads
13y ago
re.findall() returns all non-overlapping matches. We need to use a positive lookahead on the third part of the pattern to stop it from consuming the non-character:
re.findall(r"[^a-zA-Z]([a-zA-Z]+)(?=[^a-zA-Z])", ..)