2分钟
锚点$号
同理于 ^
号,$
号用来匹配字符是否是最后一个。
例如,(at\.)$
匹配以 at.
结尾的字符串。
"(at\.)" => The fat cat. sat. on the mat.
"(at\.)$" => The fat cat. sat. on the mat.
同理于 ^
号,$
号用来匹配字符是否是最后一个。
例如,(at\.)$
匹配以 at.
结尾的字符串。
"(at\.)" => The fat cat. sat. on the mat.
"(at\.)$" => The fat cat. sat. on the mat.
Copyright © 2013-2025 Tencent Cloud.All Rights Reserved. 腾讯云 版权所有
学员评价