Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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
Hooray!


Comment on Re: Regex to add space after punctuation sign

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2014-07-28 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (186 votes), past polls