I have 2 strings. Need to check if the second string is present in the first string or not with word boundaries.
string 1 = PDS Flip - cover options not available
string 2 = - cover options not available
I have tried the following approach but not working
import regex
check_text = regex.escape("- cover options not available")
text = regex.escape("PDS Flip - cover options not available")
found = bool(regex.searh(fr"\b{check_text}\b", text))
print(found)
Actual result = False
expected result = True