danj35 has asked for the wisdom of the Perl Monks concerning the following question:
At the moment I've been able to retrieve a paragraph of text from a variable by specifying a start and an end point as so:
if(Dumper($page) =~ /===Comments===(.*?)=Microarray Data=/s) { $lit_comments = $1; }
By doing this I've stored all the text under the ===Comments=== header. E.g.
===Comments===
Comments made here will be stored in $lit_comments.
=Microarray Data=
Now I have a problem where I need to do the same again, except this time I need to extract the text after the second occurrence of the ===Comments=== tag. Any ideas anyone?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Search for Second Occurence of Substing and get containing text
by BrowserUk (Patriarch) on May 06, 2010 at 15:32 UTC | |
|
Re: Search for Second Occurence of Substing and get containing text
by kennethk (Abbot) on May 06, 2010 at 15:23 UTC | |
|
Re: Search for Second Occurence of Substing and get containing text
by graff (Chancellor) on May 06, 2010 at 21:56 UTC | |
|
Re: Search for Second Occurence of Substing and get containing text
by k_manimuthu (Monk) on May 07, 2010 at 06:03 UTC |