chavanak has asked for the wisdom of the Perl Monks concerning the following question:
I want to write a regular expression to extract "GO:(followed by those numbers)" only from this text and also it has to be extracted only once. This extracted string has to be stored in an array so I can pass it to another search query. I tried with this code $line1 =~ m/"^\s+(.+)(GO:)(\d+).+"/g; and it is not working. Can anyone help me out??dd class="xref">GeneID:947412</dd> <dd class="xref">GenomeReviews:AP009048_GR</dd> <dd class="xref">GenomeReviews:U00096_GR</dd> <dd class="xref"><a href="http://amigo.geneontolog +y.org/cgi-bin/amigo/term-details.cgi?term=GO:0005524">GO:0005524</a>< +/dd> <dd class="xref"><a href="http://amigo.geneontolog +y.org/cgi-bin/amigo/term-details.cgi?term=GO:0005886">GO:0005886</a>< +/dd> <dd class="xref"><a href="http://amigo.geneontolog +y.org/cgi-bin/amigo/term-details.cgi?term=GO:0006810">GO:0006810</a>< +/dd> <dd class="xref"><a href="http://amigo.geneontolog +y.org/cgi-bin/amigo/term-details.cgi?term=GO:0016301">GO:0016301</a>< +/dd> <dd class="xref">HOGENOM:P27254</dd>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help regarding regular expression
by moritz (Cardinal) on Aug 06, 2009 at 09:39 UTC | |
by chavanak (Initiate) on Aug 06, 2009 at 10:00 UTC | |
by moritz (Cardinal) on Aug 06, 2009 at 10:55 UTC | |
|
Re: Help regarding regular expression
by ELISHEVA (Prior) on Aug 06, 2009 at 10:48 UTC | |
by chavanak (Initiate) on Aug 06, 2009 at 11:27 UTC | |
by ELISHEVA (Prior) on Aug 06, 2009 at 11:41 UTC | |
by ig (Vicar) on Aug 06, 2009 at 12:22 UTC | |
|
Re: Help regarding regular expression
by merlponk (Scribe) on Aug 06, 2009 at 09:50 UTC | |
by chavanak (Initiate) on Aug 06, 2009 at 10:19 UTC |