fixles has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to extract the word Yesterday but whatever I try fails. Is there someway of matching the newline or the spaces? Printing a join of @TD = $mech->content() =~ m|<td>(.*?)</td>|g shows yesterday but also everything else within a TD tag. The HTML is indented by about 20 spaces like the above example code. Does anyone know how I could use a regex to extract just Yesterday from this HTML? Many Thanks, James<td class="Label" align="right">Last Login:</td> <td>Yesterday</td>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex on HTML across multiple lines with WWW::Mechanize->content()
by Corion (Patriarch) on Jul 25, 2011 at 18:36 UTC | |
|
Re: Regex on HTML across multiple lines with WWW::Mechanize->content()
by onelesd (Pilgrim) on Jul 26, 2011 at 06:15 UTC |