How to run a query with regexp in Android

前端 未结 2 1709
心在旅途
心在旅途 2020-12-11 19:31

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

2条回答
  •  -上瘾入骨i
    2020-12-11 19:57

    Patterns are compiled regular expressions. In many cases, convenience methods such as String.matches, String.replaceAll and String.split will be preferable, but if you need to do a lot of work with the same regular expression, it may be more efficient to compile it once and reuse it. The Pattern class and its companion, Matcher, also offer more functionality than the small amount exposed by String.

    http://developer.android.com/reference/java/util/regex/Pattern.html

提交回复
热议问题