Skip to content Skip to sidebar Skip to footer

Sqlite Like Alternative For Regexp, Match Start Of Any Word

It does not seem possible to use REGEXP in a SQLite query in Android. If it is possible, please point me in the right direction. Is there a way to use a LIKE condition to query for

Solution 1:

It's somewhat of a hack, but...

foo LIKE'bar%'OR foo LIKE'% bar%'

might work for your needs (finding "bar" at the beginning of a word in "foo"). If you also want punctuation to serve as word delimiters, you'd have to add OR clauses for that as well (hence why it's a hack).

Post a Comment for "Sqlite Like Alternative For Regexp, Match Start Of Any Word"