Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Regex to add space after punctuation sign

by BrowserUk (Pope)
on Jan 08, 2004 at 09:39 UTC ( #319762=note: print w/ replies, xml ) Need Help??

in reply to Regex to add space after punctuation sign

I think most of the solutions so far will fail to put a space into 'x34,3b'.

There is also the question of what to do with '2,3,4,5'? Is that '2,3, 4,5' or '2, 3,4, 5' or '2, 3, 4, 5'? All are possible.

It will probably be very hard to use a single regex to do this if non-numeric bits can start and/or end with a digit.

I got close using s///e, but it was very messy.

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail

Comment on Re: Regex to add space after punctuation sign

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2015-11-27 16:16 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls