On Tue, 20 Aug 2013 16:02:50 +0200 Natxo Asenjo <natxo.ase...@gmail.com> wrote:
> I am only interested in the text '1 Critical Alarm PresentA site > wiring fault exists'; is it possible to match this is a simple way (in > fact, the text after 'Critical Alarm Present' may vary, it would be > awesome to be able to get that easily. Otherwise I am afraid I will > have to start parsing html with HTML::TableExtract Sorry, not even Perl can do magic. :( You have to determine what starts and stops the pattern you're interested in. Once that is done, with a RE to do the job. For example, to capture the number of critical alarms to the end of text: if( $text =~ m{ ( \d+ \s+ critical \s+ alarm .* ) }msx ){ my $alarms = $1; # process alarms } If you want less than that, you must first determine what stops the pattern matching. -- Don't stop where the ink does. Shawn -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/