you I think you'd be better off using somthing like HTML::Parser, but you can just remove all the tags, can't you?
Edit:: removed part of my shell-prompt (system-time [0932]) after the trailing -.my $text = '<tr align=right><td>/export/home3</td><td>308218</td><td>3 +07200</td><td>308224</td><td>7.0 days</td><td>0</td><td>0</td><td>0< +/td><td>-</td></tr>'; $text =~ s!<[^>]+>!^!g; # replacing tags with caret my @data = split(/\^/, $text); # splitting at caret my @data = grep {$_} @data; # remove undef elements print join(" : ", @data); __END__ /export/home3 : 308218 : 307200 : 308224 : 7.0 days : -
hth, regards,
tomte
Hlade's Law:
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.
In reply to Re: ugly regex question
by Tomte
in thread ugly regex question
by jcpunk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |