[Tutor] strings matching problem
Jimmy verma
jim_938 at hotmail.com
Fri Aug 8 07:36:11 EDT 2003
Hello !
First of all thanks to everyone on the list for giving consideration to my
problems. With the help of the tutor mailing list i am really learning a lot
about programming in python.
I have a small problem for now also.
I have a few names like a name followed by hash(#) and then a no. which
indicates the repeated occurance of the name.
Like .abc , .abc#1 , .abc#2
I want that if i encounter such kind of name then it should be converted to
.abc
I think that this can be done with re.compile and some kind of match with
re.match
But i am not sure what is the best way to do this.
Your suggestion will be welcomed by me.
Thanks a lot.
Regards,
Jim
_________________________________________________________________
The Six Sigma edge. Give it to your business.
http://server1.msn.co.in/features/6sigma Stay ahead!
More information about the Tutor
mailing list