I want to use regex for replacing "," with ", "(comma followed by space) but not at the end of the string:
"a,b,c,d," to "a, b, c, d,"
but also
"Berlin,London,Offenbach,Gera," to "Berlin, London, Offenbach, Gera,"
or
"123,2345,653,12," to "123, 2345, 653, 12,"
I tried in Python
import re
re.sub(r'([1-9a-zA-Z]),([1-9a-zA-Z])', r'\1, \2', "a,b,c,d,")
but get the result:
'a, b,c, d,' (space after comma between "b" and "c" is missing)
What's wrong?