Reputation: 751
I want to implement a "word only" search in sqlite.
My first option seems to be [charlist] that select words that are surrounded by [space, tab, point, comma, punctuation, etc].
Something like this: SELECT ... WHERE 'name' LIKE "%[ \t.,!?]word[ \t.,!?]%"
However I cannot find a way to add space/tab to [charlist]. Is this possible ?
What is "the best way" to implement a "word only" search in sql ?
Upvotes: 0
Views: 68
Reputation: 180020
Like does not support character classes, but GLOB does.
However, searching for words is what the full-text search extension has been designed for.
Upvotes: 1