我只知道美元符号$
将匹配字符串末尾的模式,但是re.match()
或re.search()
可以使用哪种方法?
It works with both the .search()
and .match()
methods.
.match()
is anchored to the start of the string, but you can still require that the whole string matches by including a $
anchor.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.