stanleysj has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks
I need help in creating a regex to extract the following lines from a text file.
Table: GO Terms [entity} Table: Aliases [Alias] MAL1P1.18 pfmalp012 alap11 Table: Y2H Interactions
what I need are the lines in between "Alias" .. "Table: Y2H Interactions". I tried to use the range operator but for some reason did not work. Maybe I was wrong with the syntax. Sometimes there could be no entries in between. But if there are "aliases" then i need to pick it up.
I tried a similar code like below
if /\[Alias\]/../^\s*\s$/ { push (@alias, $_); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: need help in extracting lines
by Corion (Patriarch) on Jan 13, 2009 at 13:18 UTC | |
by AnomalousMonk (Archbishop) on Jan 13, 2009 at 16:30 UTC | |
|
Re: need help in extracting lines
by jdporter (Paladin) on Jan 13, 2009 at 14:44 UTC | |
by Wiggins (Hermit) on Jan 13, 2009 at 20:46 UTC | |
by jdporter (Paladin) on Jan 13, 2009 at 21:25 UTC | |
|
Re: need help in extracting lines
by Bloodnok (Vicar) on Jan 13, 2009 at 13:35 UTC |