in reply to HTML::TreeBuilder::XPath and regular expressions
Shame on me! It turns out the simplest Perlier version actually works!
It may not be official w3.org syntax, and doesn't work in XPather, but it does in HTML::TreeBuilder::XPath.
So in case other people search for this... to find attribute values macthing a regular expression using HTML::TreeBuilder::XPath :
$tree->findnodes( '//element[ @attribute =~ /regex/ ]' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: HTML::TreeBuilder::XPath and regular expressions
by mirod (Canon) on Mar 29, 2010 at 12:43 UTC | |
by rduke15 (Beadle) on Mar 29, 2010 at 14:26 UTC | |
by rduke15 (Beadle) on Mar 29, 2010 at 14:37 UTC | |
by mirod (Canon) on Mar 29, 2010 at 15:06 UTC |