I can see how to make the expression non-greedy, which would make it possible to capture only the first setOK, so just reverse the string, find the first set, and reverse it back.
In reply to Re: Regex to find the last matching set in a long scalar
by choroba
in thread Regex to find the last matching set in a long scalar
by superwombat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |