in reply to multiple-line match mucking with regex registers
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"; }
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multiple-line match mucking with regex registers
by Voronich (Hermit) on Jul 11, 2006 at 14:30 UTC |