A question about Regex. I have the following patterns that i want to match:
A()()()(B) MATCH
A()()(B) MATCH
A()(B) MATCH
A(B) MATCH
ALSO if anything is in the brackets apart from the phrase (NO) then that should match also:
A(abc)(B) MATCH
A()(def)(B) MATCH
A()()(ghij)(B) MATCH
A(klmn)(opq)()(B) MATCH
A(NO)(B) NO MATCH
A()()(NO)(B) NO MATCH
A(abc)(NO)(B) NO MATCH
However I do not want the phrase to match if there is something that is not in the brackets:
Aabc(B) NO MATCH
A()defg()(B) NO MATCH
I have the following:
A\(.*\)*(?<!\(NO\))\(B\)
PLEASE HELP!
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.