正则表达式基础拾穗

The pattern includes a caret (^) and a dollar sign ($). These are regular expression characters that have a special meaning: 

the caret means “require that the pattern matches the start of the string,”

and the dollar sign means “require that the pattern matches the end of the string.”

原文地址:https://www.cnblogs.com/jdbc2nju/p/7223565.html