lundi 14 décembre 2015

REGEXP in Android SQLite

I am trying to get a REGEXP to work with android SQLite in the contacts database. What I am trying to do is do whole word matching for the contacts display name to look for words such as "uncle" or "aunt" even when the display name may be something like "uncle sam" or "aunt julie". However whenever I try using REGEXP I get the error

android.database.sqlite.SQLiteException: ICU error: uregex_open(): U_ILLEGAL_ARGUMENT_ERROR (code 1)

This is a simplified version of what I am trying to do in the query:

whereBuffer.append(ContactsContract.Contacts.DISPLAY_NAME).append(" REGEXP ").append("'[[:<:]]uncle[[:>:]]'");

Aucun commentaire:

Enregistrer un commentaire