此时,最小组团就发挥作用了:正则引擎会放弃所有回溯位置。
At this point, the atomic group will kick in. The engine will discard all backtracking positions.
正则表达式可以过滤特定的位置,例如行的开始或结束,以及单词的开始和结束。
A regular expression can filter for a specific location, such as the start or end of a line and the beginning and end of a word.
当正则引擎针对最小组团进行匹配时,它会跳过组团内标记的回溯位置。
When the regex engine matches an atomic group, it will discard backtracting positions that came with all tokens inside it.
应用推荐