Debugging Pattern (regex) failure in in Java (Android)

柔情痞子 提交于 2019-12-06 15:14:32
Shaded

Your DLVRYrx.matcher(...).groupCount() is simply telling you that there are 3 matching groups in the pattern it was created from.

i.e. (\\d+\\s\\p{Letter}+\\s\\d+), (\\d+(?:\\.\\d+) and (\\d+)

You need to call either

matcher.matches()

matcher.lookingAt()

or

matcher.find()

Prior to attempting to get matcher.group(0) since these methods prompt java to parse the string.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!