in reply to regex match after pattern
#!/usr/bin/perl use warnings; use strict; use XML::LibXML; my $html = 'XML::LibXML'->load_html( string => << '__HTML__'); <form method="post" action="logout.lp" name="authform" id="logoutform" +> <input type="hidden" name="rn" value="-1383135969"> <form method="post" action="login.lp" name="authform" id="authform"> <input type="hidden" name="rn" value="-1383135969"> __HTML__ my $value = $html->findvalue('//form[@action="login.lp"]/input[@name=" +rn"]/@value'); print $value, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex match after pattern
by marinersk (Priest) on Mar 12, 2015 at 16:05 UTC | |
by choroba (Cardinal) on Mar 12, 2015 at 16:08 UTC | |
by Anonymous Monk on Mar 12, 2015 at 22:59 UTC | |
|
Re^2: regex match after pattern
by littleperl (Initiate) on Mar 13, 2015 at 14:58 UTC |