I am experimenting with regex and I read the statements a bit and saw examples, but for some reason I can't get this to work. I am trying to get the word after the next pattern using look-behind.
import re
s = '123abc456someword 0001abde19999anotherword'
re.findall(r'(?<=\d+[a-z]+\d+)[a-z]+', s, re.I)
The results should be somewordandanotherword
But I get error: look-behind requires fixed-width pattern
Any help was appreciated.
source
share