views:

464

answers:

1

I want to run a query in SQLite with a regexp using Android. How do I do that?

+2  A: 

Unfortunately it doesn't look like Android currently supplies a way for you to inject a user function into sqlite, which is what you'd need to make REGEXP work (specifically, you'd need a user function named regexp()) -- so you may have to select more broadly (with a LIKE condition that's broader than the regexp you want) and further distinguish "actual" result (those that really match the regexp you want) with java.util.regex in your application.

Alex Martelli