$re = qr{ ( (?: (?&OPEN) (?: (?>(?:.*?(?=(?&OPEN)|(?&CLOSE)))) | (?-1) )* (?&CLOSE) ) ) (?(DEFINE) (?<OPEN>\bBEGIN\b) (?<CLOSE>\bEND\b) )}x;
In reply to Re^2: regex for nested "<"/">'
by jo37
in thread regex for nested "<"/">'
by clueless newbie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |