Hello,
I would like to transform a phone number of this form +33.300000000 in 03.00.00.00.00
+33 is the indicatif it could be 2 or 3 digits length.
Digits after the . are the phone number. It could be 9 or 10 digits length.
I try like this :
p = re.compile( "\+[0-9]+\.([0-9]+)", re.VERBOSE)
number = "+33.300000000"
p.sub("0\1", number)
But this doesn't work.
However, the search seams to work :
>>> p.search(number).groups()
('300000000',)
And after how to modify 0300000000 in 03.00.00.00.00 in Python ?
Thank you for your help,
Natim