My goal is to match each group starting with __ and ending with __.
For example, in this text :
__1__
__2____3__
__4_4__
We can find 4 groups.
With this regex
__.[^__]*__
the last group doesn't match.
With this one
__(?!(^_)$).*__
the 2nd and 3rd groups are gathered in one.
What is the solution please ?