[英]Regex, match any character after match
确定中间部分后,我将尝试匹配整个字符串。
我有字符串:
first:second:third:forth:fifth
我希望在例如编写时匹配它:third:
:third:
我不想在写例如:sixth:时匹配它:sixth:
:sixth:
我已经弄清楚了上半部分,一直在寻找正则表达式以扩展到比赛后的所有字符。
您需要预先检查:
(?=.*:third:).*
https://regex101.com/r/48Adar/1
[英]regex to match any character or none?
[英]How to match any character in regex
[英]Regex to match any character or fullstop?
[英]Regex to match before and after a character
[英]Regex - Match any character except character
[英]Regex cannot match any character inside quotes
[英]Regex to match any character except trailing spaces
[英]regex to match any UTF character excluding punctuation
[英]Awk Regex: match any first character
[英]Regex to match optional character in any order
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.