Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Regex to add space after punctuation sign

by dda (Friar)
on Jan 10, 2004 at 20:34 UTC ( [id://320370]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex to add space after punctuation sign
in thread Regex to add space after punctuation sign

Hmm.. Just tried:
$_ = "1.2.a.b"; s/(?!\d[.,]\d)([^\w\s])(?!\s)/$1 /g; print;
Prints "1. 2. a. b"

--dda

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-03-28 10:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found