Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: regex replacement help

by furry_marmot (Pilgrim)
on Mar 29, 2011 at 21:47 UTC ( #896279=note: print w/ replies, xml ) Need Help??

in reply to regex replacement help

Instead of changing the tildes, use them as anchors to change the characters around them.


UPDATE: Changed second $1 to $2. Stupid fingers...

UPDATE2: Just realized it was wrong, as well. What was I thinking??? This should do it.

s/~/\n/g; chomp;

Comment on Re: regex replacement help
Select or Download Code
Replies are listed 'Best First'.
Re^2: regex replacement help
by choroba (Canon) on Mar 31, 2011 at 11:06 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-11-27 17:55 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