[英]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.