android java正则表达式命名组

我想用
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

如果确实需要该功能,则需要编写包装器并自行解析表达式以提供命名捕获组功能.

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...