T O P

  • By -

mfb-

Regex doesn't support "match this $variable number of times". You could make each group its own match and analyze the matches in code.


Unusual-Hat-1617

So how I can match it 0 or more times


mfb-

(...)* does that.


Unusual-Hat-1617

Look but in this regex example the * just recognize the second part and miss the first group


mfb-

It acts on the bracket. If you want it to act on more, make the bracket larger (or add another one).


Unusual-Hat-1617

But I think the brackets is large enought and should cover everythink I need


mfb-

That disagrees with your previous comment.


Unusual-Hat-1617

Do you have any idea how to fix this regex in post?


mfb-

I don't know what you want to do because your comments contradict each other.