How to use regexp in sqlite

android-sqlite, regex

Solution

Currently am working on sqlite3+php for my web application in Ubuntu 12.04. I was also faced the same issue then after research i had found that we need to install one pcre package for sqlite3. Here we go how to

- `apt-get install sqlite3-pcre`

- Then go to sqlite3 command line `sqlite3 test.db`

- run the command `.load /usr/lib/sqlite3/pcre.so`

- test : `SELECT url FROM table_name where url REGEXP '^google.*';`

After following those 3 steps its working fine for me. If am wrong regarding this please correct me. I hope it will help you

Thanks

Problem

Please prompt, how used REGEXP in SQLite? Realization: ``` SELECT field FROM table WHERE field REGEXP '123' ``` It is not working. `Error: no such function: REGEXP`

Original source