I'm not so strong in SQL, so I was wondering if there is a possibility to query a string for specific words, which are not necessarily separated by a space but sometimes by special chars too.
Row1: "This could be a string where the Word -SAR-is contained but not as a normal word separated by spaces"
Row2: "This instead is a string which contains the name of a girl called Sarah"
Row3; "This is a normal string where SAR is just a word"
Now I would like to select the rows, where SAR is contained (not important if uppercase or lowercase) as a word and not as part of a word like the name SARah. In my example they would be row1 and row3.
I wanted to use Regexp, but I realized that it is not implemented in SQLITE3 by default. How would you aproach that?
Until now I tried something like that, but it does not properly work:
WHERE (`myField` LIKE '% SAR %' OR `myField` LIKE '% SAR_' OR `myField` LIKE '% SAR_ %' OR `myField` LIKE '% SAR' OR `myField` LIKE '%-SAR %' OR `myField` LIKE '%-SAR_' OR `myField` LIKE '%-SAR_ %' OR `myField` LIKE '%-SAR');