Before I read the message: I screwed up. Let me write again
>> x = re.compile("CL(?P<name1>[a-z]+)") # group name "name1" is attached to the match of lowercase string of alphabet # Now I have a dictionary saying {"name1", "iamgood"} # I would like a function, that takes x and my dictionary and return "CLiamgood" # If my dictionary instead have {"name1", "123"}, it gives error on processingit # # In general, I have reg-expression where every non-trivial match has a group-name. I want to do the reverse of reg-exp match. The function can take reg-exp and replace the group-matches from dictionary # I hope, this make it clear. -- http://mail.python.org/mailman/listinfo/python-list