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

Re: Looking for white spaces between words

by Roy Johnson (Monsignor)
on Jun 10, 2004 at 21:17 UTC ( [id://363206]=note: print w/replies, xml ) Need Help??


in reply to Looking for white spaces between words

Just for fun, a lookaround solution. When you find a space preceded by a space, or a space followed by a space, replace it:
s/(?<= ) | (?= )/&nbsp;/g;

The PerlMonk tr/// Advocate

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-18 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found