smackdab has asked for the wisdom of the Perl Monks concerning the following question:
my $g=<<'_END_'; ## START # comment 1 # 2 # 3 # 4 key1=val1 # info a # b # c # d # e key2=val2 # comment ! # @ # # key3=val3 _END_ my $id = 'key3'; my ($ret) = $g =~ m/(.*)(?!\n\s*\n)\n$id/s; print $ret;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multi-line regex match quest
by sauoq (Abbot) on Sep 29, 2002 at 05:20 UTC | |
by smackdab (Pilgrim) on Sep 29, 2002 at 06:04 UTC | |
by kelan (Deacon) on Sep 29, 2002 at 15:15 UTC | |
by kelan (Deacon) on Sep 29, 2002 at 16:37 UTC | |
|
Re: multi-line regex match quest
by BrowserUk (Patriarch) on Sep 29, 2002 at 05:02 UTC | |
by nagilum (Initiate) on Sep 30, 2002 at 15:21 UTC |