Check out XML::LibXML for the nice ways to do this, using standards such as XPath and DOM. Regular expressions are not a very good way to parse structured input like XML, unless you can limit the input to a known subset of XML forms.
$h=$ENV{HOME};my@q=split/\n\n/,`cat $h/.quotes`;$s="$h/." ."signature";$t=`cat $s`;print$t,"\n",$q[rand($#q)],"\n";
In reply to Re: Extracting a substring from HTML
by mugwumpjism
in thread Extracting a substring from HTML
by richill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |