
上QQ阅读APP看书,第一时间看更新
Anchors
Anchors do not match the characters at all. Anchors are used to match the characters at certain positions, such as at the beginning or end of a line. If the anchors are not used in the proper position, either at the beginning or end of a regular expression, they do not act as anchors. The ^ and $ are two metacharacters that are known as anchors in regular expressions.