I must be missing something obvious here. I want to grab the text between the strings <blockquote> and </blockquote> so I tried this ...
The output is simply ...$ cat test.pl #!/usr/bin/perl my $data; while(<DATA>) { $data .= $_; } my $stuff = "uninit"; if ( $data =~ /<blockquote>(.*)<\/blockquote>/m ) { $stuff = $1; } print "$stuff\n"; __DATA__ </p> <blockquote>This is a non-fiction collection of Maugham's observations + of life in Asia in the early 20th Century. (Summary by BellonaTimes) </blockquote> <!-- if div.cd-cover --><div class="cd-cover"> </div><!-- end if -->
... I was hoping for ...uninit
... what am I doing wrong here?This is a non-fiction collection of Maugham's observations of life in +Asia in the early 20th Century. (Summary by BellonaTimes)
Thanks!
In reply to Isn't /m for multiline regex? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |