我想用
matcher.group("login");
在eclipse上的android 8中,但似乎没有Matcher.group(String)存在.
你有(内置)解决方案吗?
解决方法
Android
Pattern
类实现由ICU提供,准确地说是
ICU4C.
The regular expression implementation used in Android is provided by 07002. The notation for the regular expressions is mostly a superset of those used in other Java language implementations. This means that existing applications will normally work as expected,but in rare cases Android may accept a regular expression that is not accepted by other implementations.
而且ICU4C目前不支持命名捕获组.你必须依靠编号的捕获组.
ICU does not support named capture groups. 07003