word matching with boundary not works

15 views Asked by At

I want to match M.S. as word in text with:

re.search(r"\b(M.S.)\b", "M.S. in computer science.")
re.search(r"\b(M\.S\.)\b", "M.S. in computer science.")

But none of the above return any results.

0

There are 0 answers