I have something like this
aabbabcaabda
for selecting minimal group wrapped by a I have this /a([^a]*)a/
which works just fine
But i have problem with groups wrapped by aa, where I'd need something like
/aa([^aa]*)aa/
which doesn't work, and I can't use the first one like /aa([^a]*)aa/
, because it would end on first occurence of a, which I don't want.
Generally, is there any way, how to say not contains string in the same way that
I can say not contains character with [^a]
?
Simply said, I need aa followed by any character except sequence aa and then ends with aa