does the re work?

12 views
Skip to first unread message

Vijay Ramachandran

unread,
May 25, 2011, 10:52:39 PM5/25/11
to esmre-discuss
Hello. I am not sure if the following is working as expected.
>>> import esmre
>>> index = esmre.Index()
>>> index.enter(r"\bway\W+haye?\b", "sea shanty")
>>> index.query("broadWay to go?")
['sea shanty']

If I understand correctly, the \bway says that way should be found at
a word boundary, however, broadway seems to match when it shouldn't?

Am I misunderstanding something?

thanks!
Vijay
Reply all
Reply to author
Forward
0 new messages