in reply to Re^2: How to extract a pattern in Perl regex?
in thread How to extract a pattern in Perl regex?

c:\@Work\Perl\monks>perl -wMstrict -le "my $result = '<title>The Rain in Spain</tItLe>'; my ($newresult) = $result =~ m{ <title> (.*?) </title> }xmsi; print qq{'$newresult'}; " 'The Rain in Spain'

Update: Or, going a step further:

c:\@Work\Perl\monks>perl -wMstrict -le "use Data::Dump qw(dd); ;; my $result = 'yada <title>The Rain in Spain</tItLe> blah <TITLE>How N +ow Brown Cow</TitlE> foo'; my @titles = $result =~ m{ (?i) <title> (.*?) </title> }xmsg; dd \@titles; " ["The Rain in Spain", "How Now Brown Cow"]


Give a man a fish:  <%-{-{-{-<