Search to exclude html tags in MySQL
I need a search query which will exclude text within HTML tags. For example, I need to search for a word called "spa" in my database. There are HTML tags in the database, so the result will contain <span>
tags.
I need the search query to check only the words starti开发者_JS百科ng with the word "spa" but not within any HTML tag.
Please help.
Regex are always really hard to use for HTML, cause there are many rules that apply to it.
You should consider using a HTML-Parser instead.
精彩评论