[英]ignore character within single quotes regex
我试图匹配一个不在单引号内但在外面的冒号。
说:
SELECT :1 FROM Table 'not this colon : inside single quotes'
它应该只匹配单引号外的冒号。
你可以使用这个正则表达式:
:(?=((?:[^']*'){2})*[^']*$)
RegEx演示
[英]PHP: Regex to ignore escaped quotes within quotes
[英]Regex for replacing character within quotes
[英]How to ignore a single character in RegEx
[英]Regex split by commas - not within parenthesis or single quotes
[英]Regex to replace a string not within quotes (single or double)
[英]R Ignore character within a Regex string
[英]How to ignore \t character inside double quotes using regex?
[英]Regex - Single Word Without Quotes and Multiple Words Within Quotes
[英]regex: get all of a single character, but not when between single quotes
[英]Regex to replace matches but also ignore when matches within quotes
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.