I have a string like this:
BEGIN
blabla..
END;
BEGIN
one two
END;
And I want to make regex that will find this parts separately.
I made regex (?i)BEGIN[\s\S]*(?i)END;
But it finds this string as one instance matching. But I need two. How to make it search END; for first occurency, not last ?
thanks!
it’s called lazy quantifier.