I used the "|" as regex delimiter, to avoid the "leaning toothpicks" syndrome - ie to avoid having to escape the "/".
But doing that to avoid LTS puts you in danger of succumbing to STD (Straight Toothpick Distemper) the first time you use an | alternation in your regex. Why not just use a pair of nesting delimiters, { } for e.g., and be immunized against many of these pathologies?
$s =~ m{ (\d{1,2}) / (\d{1,2}) / (\d{1,2}) }xmsg
In reply to Re^2: Extract a pattern from a string
by AnomalousMonk
in thread Extract a pattern from a string
by avim1968
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |