Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
how to parsse this

Posted by revtopo (revtopo), 9 July 2007
Hi there,

I am trying to prase a set of data.

data is like this:

Gene3D; G3DSA:1.10.20.10; Histone-fold; 1.
PANTHER; PTHR11064:SF9; CBFA_NFYB_topo; 1.
Pfam; PF00808; CBFD_NFYB_HMF; 1.
PRINTS; PR00615; CCAATSUBUNTA.
EMBL; AAEE01000005; EAK88737.1; -; Genomic_DNA.
InterPro; IPR001241; Topo_IIA_B/N.
PROSITE; PS00177; TOPOISOMERASE_II; UNKNOWN_1.
EMBL; CP000360; ABF43760.1; -; Genomic_DNA.
GenomeReviews; CP000360_GR; Acid345_4761.
InterPro; IPR002510; Peptidase_U62.
Pfam; PF01523; PmbA_TldD; 1.
EMBL; AY596923; AAT09328.1; -; Genomic_DNA.
HSSP; P09097; 1AB4.
SMR; Q6PLK1; 1-115.

of this i need only the EMBL line.could any one help me to parse that.

thanks.


Posted by admin (Graham Ellis), 10 July 2007
Try someting like

@emlines = grep(/^EMBL/,<DATA>);

Posted by revtopo (revtopo), 10 July 2007
thanks but i have done the other way around. this too works:

$line =~ /^DR\s+EMBL;\s+(\w+)/



Posted by KevinAD (KevinAD), 17 July 2007
on 07/10/07 at 11:05:13, revtopo wrote:
thanks but i have done the other way around. this too works:

$line =~ /^DR\s+EMBL;\s+(\w+)/




Then clearly the data you posted and the real data you are parsing are different.  There is no "DR " in the lines containing EMBL in the data you posted

Posted by admin (Graham Ellis), 17 July 2007
on 07/17/07 at 07:39:41, KevinAD wrote:
Then clearly the data you posted and the real data you are parsing are different.


Kevin, welcome to the forum ..... I'm afraid you'll find that many questions we get asked aren't as crisp as you might like, but then we do pride ourselves in being here to help people who are struggling a bit!



Posted by KevinAD (KevinAD), 17 July 2007
on 07/17/07 at 12:58:11, Graham Ellis wrote:
Kevin, welcome to the forum ..... I'm afraid you'll find that many questions we get asked aren't as crisp as you might like, but then we do pride ourselves in being here to help people who are struggling a bit!



Hi Graham,

Thank you for the welcome. I'll keep what you said in mind when posting here.

Kevin



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho