You might try using my super-duper named capture variable module.
use Regexp::NamedCaptures; if ( /^(?< \$number >\d+) (?:MatchMe \[(?< \$reason_why >.*)\]|I need +to be dispatched.*:\s(< \$reason_why >.*))$/ ) { # $reason_why got set from either $2 or $3 but we don't really car +e about the numbered variables now. print "$number $reason_why\n"; }
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re: multiple-line match mucking with regex registers
by diotalevi
in thread multiple-line match mucking with regex registers
by Voronich
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |