Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^7: Regex problems using '|'

by moritz (Cardinal)
on Jul 22, 2008 at 13:06 UTC ( [id://699300] : note . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    m/(?s:.*)Remediation Report\n\n(.+?)\n|^(.+?)\n/;
    
  2. or download this
    while ($str =~ m/($regex)/){
        print $1, "\n";
    }