net.sqlcipher.database.SQLiteException: no such function: REGEXP



Does sqlCipher support Regex in Android. I am trying to execute regex in Android but giving “no such function”. Please tell me the way to run regex.

Caused by: net.sqlcipher.database.SQLiteException: no such function: REGEXP: , while compiling: select * from category where path REGEXP '^?\.[0-9]+$'


Hello @Bharath_Kumar_Bachin - no SQLCipher doesn’t naively support a regex function. Like the upstream SQLite, if you provide your own regexp() function the keyword should work however:

The REGEXP operator is a special syntax for the regexp() user function. No regexp() user function is defined by default and so use of the REGEXP operator will normally result in an error message. If an application-defined SQL function named “regexp” is added at run-time, then the “X REGEXP Y” operator will be implemented as a call to “regexp(Y,X)”.

See the language specification and create function documentation for more details.