metalfan has asked for the wisdom of the Perl Monks concerning the following question:
greets#!/usr/bin/perl use warnings; use strict; use diagnostics; use WWW::LEO; use Data::Dumper; open(INFO, "< /home/metalfan/todo/dictionaries/Vokabeln\ -\ absolut +ion\ gap.html") || die("can't open datafile: $!"); my @file=<INFO>; { my $result; for my $entry (@file) { # file format: # <TR> # <TD WIDTH=10% HEIGHT=61 VALIGN=TOP> # <P ALIGN=LEFT>Wrought</P> # </TD> # <TD WIDTH=90%> # <P><BR> # </P> # </TD> # </TR> if ($entry =~ m/ <TR> <TD\sWIDTH=\d{1,2}%\sHEIGHT=\d{1,3}\sVALIG +N=TOP> <P\sALIGN=LEFT>(.+)<\/P> <\/TD> <TD\sWIDTH=\d{1,2}%> <P><BR> <\/P> <\/TD> <\/TR> /sx) { print "$1\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multi line regex
by Happy-the-monk (Canon) on Jan 09, 2006 at 14:39 UTC | |
|
Re: multi line regex
by matija (Priest) on Jan 09, 2006 at 14:54 UTC | |
by metalfan (Novice) on Jan 18, 2006 at 17:51 UTC | |
by matija (Priest) on Jan 18, 2006 at 23:02 UTC | |
|
Re: multi line regex
by murugu (Curate) on Jan 09, 2006 at 15:00 UTC | |
by ishnid (Monk) on Jan 09, 2006 at 15:46 UTC | |
|
Re: multi line regex
by ptum (Priest) on Jan 09, 2006 at 14:41 UTC | |
|
Re: multi line regex
by Perl Mouse (Chaplain) on Jan 09, 2006 at 14:40 UTC |