stallion has asked for the wisdom of the Perl Monks concerning the following question:
im trying to extract some tags between start and end in a file..for eg..the file format is
[start] bbc_arc_001 bbc_arc_002 abc_arc_001 [end] bbc_arc_001 bbc_arc_002 bbc_arc_003 bbc_arc_004
I want the bbc_arc_001 and bbc_arc_002 extracted from the file i.e the tags which is present b/w start and end..
I have the regex for extracting the tags from the whole file but how to specify my search within the start and end..Thanks Monks...
The snippet is
if ($_ =~ /$bbc_Prefix[a-zA-Z]*[0-9]*_*\d+/i) {
i have opened the file and read the whole contents and $_ contains the data..
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extract Tags between Two strings
by NetWallah (Canon) on Jun 11, 2012 at 14:35 UTC | |
|
Re: Extract Tags between Two strings
by fishmonger (Chaplain) on Jun 11, 2012 at 15:27 UTC | |
|
Re: Extract Tags between Two strings
by ww (Archbishop) on Jun 11, 2012 at 13:57 UTC | |
|
Re: Extract Tags between Two strings
by Athanasius (Archbishop) on Jun 11, 2012 at 14:58 UTC | |
|
Re: Extract Tags between Two strings
by ansh batra (Friar) on Jun 11, 2012 at 15:04 UTC |