Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Insert comma after every character

by choroba (Cardinal)
on Apr 21, 2010 at 13:52 UTC ( #836064=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://836064]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2022-12-08 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?