[Tutor] Regular expression

kumar s ps_python at yahoo.com
Thu Oct 7 23:27:29 CEST 2004


Dear group, 
 I have a string that looks like this:
[AKT|PI3K][RHOA|BCL:CDC42:IKK:RAC1:RAL:RALBP1]

I wanted to make the stuff that is enclosed in [] as
an element in a dictionary. 

something like this:

a = {
     'AKT': 'PI3K';
     'RHOA: 'BCL','CDC42','IKK','RAC1','RAL',RALBP1
}

my main of this exrcise is to write a script that will

take this input and write to a file the following
format:

digraph a {
         PI3K -> AKT;
         BCL -> RHOA;
         CDC42 -> RHOA;
         IKK -> RHOA;
         RAC1 -> RHOA;
         RAL -> RHOA;
         RALBP1 -> RHOA;
}


I wante to use a reg. exp and trap stuff in between []
into a list or a dictionary. and then write elements
in to the following format. 

Any help please. 

thanks
Kumar. 


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


More information about the Tutor mailing list