Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: regex for removing quoted text

by atcroft (Monsignor)
on Mar 10, 2011 at 05:02 UTC ( #892345=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $str = q{this is "a test} 
        . qq{\n} 
    ...
    print qq{=====}; 
    $str =~ s/"[^"]+"//gs; 
    print $str;
    
  2. or download this
    this is "a test
    this is "only a "poor "test
    =====
    this is only a test