Help for this page

Select Code to Download


  1. or download this
    my $pat     = qr{ .*<author>(.*)<\/author>.*<text>(.*)<\/text }xs;
    
  2. or download this
    my $pat     = qr{ .*?<author>(.*?)<\/author>.*?<text>(.*?)<\/text }xs;
    
  3. or download this
    while ($data =~ m/$pat/gc) {
       my ($auth, $text) = ($1, $2);
    ...
       }
      printf "%s: %s\n\n" , $auth , $text;
    }