In these two patterns:
1: abc)
2: a(bc)
I am trying to create a pattern that will match string 1 and return NULL if matched against string 2. I.e. only match if one right parenthesis is present with no left parenthesis. If both a right and a left parenthesis is present, then return NULL. So I am trying:
~/ % pcretest
PCRE version 8.45 2021-06-15
re> "(.*?)\((*SKIP)(*F)|.*?\)"
data> "abc)"
0: "abc)
data> "a(bc)"
0: bc)
The expression does skip the left parenthesis in "a(bc), but I would like it to return NULL. How can I do that?