jeudi 29 janvier 2015

How to achieve word boundary in Sqlite Android?

I would like to achieve the following,



SELECT * FROM tablename where columnname REGEXP '[[:<:]]somestring[[:>:]]'


Where i am interested in only exact strings.


I have been using the exact SQL above in MySQL and now migrating most of the code to android apps.


But I have been looking at various posts where it is mentioned that REGEXP isn't supported in Android Sqlite (for example: link1, link2, link3 ).


Is there a way to enable REGEXP in Android?


If not are there any alternatives for the above SQL?


Thank you,


EDIT: Currently I am receiving the following exception when using REGEXP in Android,



android.database.sqlite.SQLiteException: no such function: REGEXP (code 1):...

Aucun commentaire:

Enregistrer un commentaire