perlre says
(?(condition)yes-pattern|no-pattern)
(?(condition)yes-pattern)
Conditional expression. Matches yes-pattern if condition yields a true value, matches no-pattern otherwise. A missing pattern always matches.
In reply to Re^2: Conditional regex
by Anonymous Monk
in thread Conditional regex
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |