To grasp how this works you first need to understand the access pattern of a Matcher to its CharSequence.
为了掌握这种方法,首先需要理解Matcher到其CharSequence的访问模式。
In Listing 1, once a regular expression is compiled into a Pattern, it creates a matcher with the matcher method.
在清单1中,一旦将正则表达式编译成Pattern,它就创建了带matcher方法的matcher。
These two classes — pattern and Matcher — are the whole pattern-matching library.
这两个类(Pattern与Matcher)就是整个模式匹配库。
应用推荐