I have the search string "sp".
In my database I have product titles that contain html tags.
Example 1:
I am an <span class="bold">examplatory</span> string.
Example 2:
I am a very beautiful spoon.
I want to make sure a result does not get shown if the search string is contained inside the html tag. Hence: I want example 1 not to show, because here "sp" is contained inside an html tag, but only example 2.
How can I check if the search string "sp" is a string part of an html tag?