SyntaxFix
Write A Post
Hire A Developer
Questions
\b is used as word boundary
word = "categorical cat"
Find all "cat" in the above word
without \b
re.findall(r'cat',word) ['cat', 'cat']
with \b
re.findall(r'\bcat\b',word) ['cat']