yiGmMk / comment_blog

the comments of www_programnotes_cn
0 stars 0 forks source link

Go 正则匹配 | ProgramNotes #91

Open yiGmMk opened 1 year ago

yiGmMk commented 1 year ago

https://www.programnotes.cn/go_regexp/index.html

正则匹配/regexp 规则元字符 ^ 匹配输入字符串的开始位置 $ 匹配输入字符串的结束位置 examplevin码12345678// 完整匹配: ^[A-HJ-NPR-Z\d]{8}[X\d][A-HJ-NPR-Z\d]{3}\d{5}$// vin码可能不在字符串最前面,有可能在中间// 去掉^(匹配字符串开头,在多行模式中匹配