gdnew has asked for the wisdom of the Perl Monks concerning the following question:
>sp|P49929|SC52_SHEEP DITCAEPQSVRGLRRLGRKIAHGVKKYG >gi|1771590|emb|CAA70562.1| temporin B precursor MFTLKKSLLLLFFLGTINLSL +CEEERNAEEERRDEPDERDVQVEKRLLPI
I try using the regex below:sp == P49929 gi == 1771592
It will print##$lines contains the string to be matched if(/^>(\w+)\|(.*)?\|.*?$line.*\n/i){ $flag=1; print OUT "$_"; print "$1 == $2\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: get some part of the string using regex
by davis (Vicar) on May 17, 2002 at 09:10 UTC | |
by Sifmole (Chaplain) on May 17, 2002 at 11:23 UTC | |
|
Re: get some part of the string using regex
by jmcnamara (Monsignor) on May 17, 2002 at 09:11 UTC | |
|
Re: get some part of the string using regex
by Dog and Pony (Priest) on May 17, 2002 at 09:13 UTC | |
by gdnew (Acolyte) on May 17, 2002 at 10:08 UTC |