It is known that \b
means word boundary in regular expression. However the following code of re
module in python doesn't work:
>>> p=re.compile('\baaa\b')
>>> p.findall("aaa vvv")
[]
I think the returned results of findall
should be ["aaa"]
, however it didn't find anything. What's the matter?