[Tutor] REgular expression
Martin Gandhi
bioinfo_python at yahoo.com
Wed Feb 25 23:23:29 EST 2004
Hi group,
I am a newbie to Python. I am trying to parse the content between " ". My file containts a list of 5000 vertices, please see below.
I've been trying to parse the content inbetween quotes ("xxxx").
My Regular Expression:
>myre = re.compile("\s\"/[a-zA-Z0-9]\"/")
>m = myre.match(str)
>print m.group()
>None
I tried several other option, but every time I get None as the answer.
Could any one please help me in getting the content between quotes. A part of the file that I have to parser is pasted below:
Thanks
MG
*Network aho2
*Vertices 5000
1 "EGFR" box
2 "Src" ellipse
3 "RIP"
4 "SHP2"
5 "SOS1"
6 "SOS2"
7 "Epiregulin"
8 "Grb2"
9 "EGF"
10 "Cbl"
12 "Caspase1"
13 "Tenascin C"
14 "G(alphai)"
---------------------------------
Do you Yahoo!?
Get better spam protection with Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040225/a11cb92f/attachment.html
More information about the Tutor
mailing list