To grasp how this works you first need to understand the access pattern of a Matcher to its CharSequence.
为了掌握这种方法,首先需要理解Matcher到其CharSequence的访问模式。
This expression is then retained by the Pattern class before it is passed on to the Matcher class to check for matches in the context of a character sequence.
Pattern 先保存要使用的表达式,然后将其传递给 Matcher 类以便在字符序列的上下文中检查其匹配情况。
In Listing 1, once a regular expression is compiled into a Pattern, it creates a matcher with the matcher method.
在清单1中,一旦将正则表达式编译成Pattern,它就创建了带matcher方法的matcher。
应用推荐