On http://regexstorm.net/tester
i use the following pattern:
(?:(?!\(|\)|\,).)*(?:(?:(?'open'\()(?:(?!\(|\)).)*)+((?'content-open'\))(?:(?!\(|\)|\,).)*)+)*(?(open)(?!))
And the following value:
(asi(de, fghdfh(fghjgh))),(dfgsdg)
rtyerty,
dhggjkmf,
bnmvbm,
cvbngfh,
iopuip
And every other match for me is empty. It works correctly if you switch the first *
to a +
, but i need it to be a *
, because there doesn't have to be any characters before the balanced-group. I know that i can just ignore the empty matches, but it is kind of annoying to me and i am wondering if there may be something wrong with my pattern?
Is there a specific character or anchor that is getting matched that i can throw into a [^...]
group to use instead of the initial .
?