Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: replace a string multiple times

by igelkott (Priest)
on Nov 16, 2014 at 09:58 UTC ( [id://1107337]=note: print w/replies, xml ) Need Help??


in reply to replace a string multiple times

You wrote "string" in the title and your question includes a quoted string but still, asking for "int" makes me wonder if you really meant that you're looking for integers. Seems unlikely, but here's a solution, just in case:

s/(\d+)/$1 $1 $1/g;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (1)
As of 2024-04-25 04:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found