http://qs1969.pair.com?node_id=836064


in reply to Insert comma after every character

\d stands for digit. You might rather use this expression:
s/(?=.)(?<=.)/,/g
It places a comma between any two characters but not at newlines or start/end of string as
s//,/g
would do.