Expand/Shrink
Zdroj: (dots1.1.py)
  1   import re
  2   
  3   text = "Example text: 1.1, 2.4, 20. January, 31.1.2005 and 3.14 end"
  4   
  5   print re.sub( "(\s\d+)\.(\d+[^.0-9])", r"\1,\2", text) 
stdout:
Example text: 1,1, 2,4, 20. January, 31.1.2005 and 3,14 end
Doba běhu: 23.0 ms