Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Extract the matching stringsby poulhs (Beadle) |
on Nov 11, 2010 at 23:18 UTC ( [id://870952]=note: print w/replies, xml ) | Need Help?? |
something like: You first need to determine the syntax of the lines you want, and the location of the values you want to extract: Is the "YP_001648463.1" always the first field after the VERSION? Is the RNA always last on the DBSOURCE lines? You should consider what to do with invalid input: what happens if DBSOURCE is not present or $protname does not match the ACCESSION-value... For more info on regular expressions, check out perldoc perlre.
In Section
Seekers of Perl Wisdom
|
|