I have a pattern
pattern = "hello"
and a string
str = "good morning! hello helloworld"
I would like to search pattern
in str
such that the entire string is present as a word i.e it should not return substring hello
in helloworld
. If str does not contain hello
, it should return False.
I am looking for a regex pattern.