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

Hi,

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.

Hi
My dictionary project use arabic language for doing searchview between search list. run project was successful with using regex. but using of SQLCipher for encrypt caused error. when typed arabic character in search view:

net.sqlcipher.database.SQLiteException: no such function: REGEXP: while compiling: Select * From tblWord Where word_arabic REGEXP ‘^ل[ًٌٍَُِّْ]{0,}.*’

how can i to fix this error. is there example or tutorial?
thanks for answer.

I notice that since SQLite 3.36.0, the REGEXP extension is now included in CLI builds. Does this change anything regarding potential inclusion in SQLCipher builds?

https://www.sqlite.org/releaselog/3_36_0.html

1 Like

I would like to be able to add this function, thank you~