httptech has asked for the wisdom of the Perl Monks concerning the following question:
So I am testing using a local file and a loop that looks like this:
This works just fine. However I am wondering, as I often do, is there Another Way To Do This?while (<>) { my $node; $node = $1 if /^<TR bgcolor=.*>([^<]*)<\/a>/io; next if $node =~ /^re:/io; print "Found original: $node\n" if $node; }
Basically I need to match all titles that don't start with "RE:". According to page 230 of Mastering Regular Expressions, this concept is called lookbehind, and it also tells me I Can't Do That In Perl.
So I find myself wondering; WWCABD? (What would chromatic and btrott do? <g>)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: lookbehind
by mdillon (Priest) on May 07, 2000 at 21:02 UTC | |
by httptech (Chaplain) on May 07, 2000 at 22:56 UTC | |
by mdillon (Priest) on May 07, 2000 at 23:28 UTC | |
by httptech (Chaplain) on May 08, 2000 at 03:30 UTC | |
|
Re: lookbehind
by chromatic (Archbishop) on May 09, 2000 at 19:12 UTC |