how to search sqlite database using regular expression in android?

前端 未结 2 859
既然无缘
既然无缘 2020-12-21 09:49

I am trying to search a database using regular expression in sqlite. Here is my code:

cursor = db.rawQuery(\"SELECT _id, employee FROM employees WHERE employ         


        
2条回答
  •  执笔经年
    2020-12-21 10:19

    In sqllite the "REGEXP" function is not included by default and you need to "roll your own".

    However the "LIKE" operator should do what you want as long as your searches are reasonably simple.

    the docs

提交回复
热议问题