in reply to Re: Two lines Regular Expression
in thread Two lines Regular Expression
open(TMPFILE,"<main.html"); while (<TMPFILE>) { chomp; my $data; my $in = join('',<TMPFILE>); if ($in =~ /(myword)\s+nextLine/) { print "Match = " . $1; $data = $1; } } print $data #I want this to print my match results here on myword # so it should print "myword" here but it doesnt.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Two lines Regular Expression
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 |