in reply to Remove html tags to obtain plain text
If this really is your source data, and you wish to extract each td in a table:
use strict; use warnings; use feature 'say'; use Mojo::DOM; my $p = Mojo::DOM->new(); my $string = '<style>table{border-collapse: collapse;margin-left: +1cm;font-Family: courier;width: 60%}.hoverTable tr{background: #D8D8D +8;} .hoverTable tr:hover{background-color: #ffff99; }</style><table b +order=2 class="hoverTable">[20160628_151916] <tr><td bgcolor="#366092 +"><font color="White"> PLAIN TEXT TO BE EXTRACTED</td>'; my $dom = Mojo::DOM->new( $string ); $dom->find('tr td')->each( sub{ my $td = shift; say $td->children->map('text')->join('\n'); });
|
|---|