Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Here is what I have tried along with at least 20 other attempts but cant get it to work:myword nextLine
open(TMPFILE,"<main.html"); while (<TMPFILE>) { if ($_ =~ /myword\s+nextLine/) #ALSO tried: if ($_ =~ /myword\nnextLine/) # if ($_ =~ /myword\\nnextLine/) { print "$_\n"; } } close TMPFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Two lines Regular Expression
by hardburn (Abbot) on Jun 09, 2003 at 17:47 UTC | |
by Anonymous Monk on Jun 09, 2003 at 19:33 UTC | |
by elvester (Beadle) on Jun 09, 2003 at 21:42 UTC | |
by Anonymous Monk on Jun 09, 2003 at 22:52 UTC | |
by allolex (Curate) on Jun 10, 2003 at 07:35 UTC | |
by hardburn (Abbot) on Jun 10, 2003 at 13:54 UTC | |
|
Re: Two lines Regular Expression
by pzbagel (Chaplain) on Jun 09, 2003 at 17:48 UTC |