Perl: the Markov chain saw | |
PerlMonks |
Re^3: Regex Parsing Styleby aquarium (Curate) |
on Nov 26, 2010 at 03:12 UTC ( [id://873758]=note: print w/replies, xml ) | Need Help?? |
that's a heuristic you need to work out. if the alternatives are not exclusive, then the leftest match will always match first. if it was me, i'd run each regex separately and additively collect flags for any matches. then at the end of this parsing you can decide exactly what you want to happen based on combinations of flags..possibly in a switch construct.
the hardest line to type correctly is: stty erase ^H
In Section
Seekers of Perl Wisdom
|
|