Output:use 5.010; use strict; use warnings; while (<DATA>) { chomp; say "$_ ", /(<+)[^<>]*(>+)(*COMMIT)(?(?{length($1) == length($2)})|(*FAIL +))/ ? "matches" : "does not match"; } __DATA__ <1> <<2>> <<3> <<<<4>> <<5>>>>
<1> matches <<2>> matches <<3> does not match <<<<4>> does not match <<5>>>> does not match
In reply to Re: experimental regex (?(?{code}) conditional (??{ 'code' }) )
by JavaFan
in thread experimental regex (?(?{code}) conditional (??{ 'code' }) )
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |