Boundary matche...LOGIN

Boundary matchers and groups

The above points have taken up a lot of space. Now we will introduce some concepts of boundary matching characters and groups.

The general boundary matching characters are as follows:

Syntax Description
^ Matches the beginning of the string (matches the beginning of each line in the case of multiple lines)
$ Matches the end of the string (matches the end of each line in the case of multiple lines)
\A Matches only The beginning of the string
\Z matches only the end of the string
\b matches \w and \W
\B [^\b]
grouping, expression enclosed in parentheses The formula is grouping. The grouping expression (...) actually treats this part of characters as a whole. Of course, there can be multiple groups. Every time a group is encountered, the number will be increased by 1, and quantifiers can also be added after the grouping.

There should be examples here, but considering the space issue, I won’t post them

Next Section
submitReset Code
ChapterCourseware