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

Re: Making multiple replaces through Regex

by Punitha (Priest)
on Nov 27, 2008 at 06:23 UTC ( #726310=note: print w/replies, xml ) Need Help??

in reply to Making multiple replaces through Regex

Try like this,

my ($colno) = $_ =~ /<csp c="(\d+)">/; my $csp; for my $i (1..$colno) { $csp = $csp."<colspec colnum=\"$i\" colname=\"col$i\"\/>\n"; } $_=~s/<csp c=\"$colno\">/$csp/g; print "$_";


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://726310]
LanX omg my browser is posting again on its own ...
[LanX]: choroba: GREAT JOKE! xD
LanX starts googling the punch line ...
[choroba]: suddenly, a weird noise can be heard, and the conductor stops them
[choroba]: (sorry, was interrupted by a call)
[choroba]: What was that? asks he
[choroba]: and the triangle player says, "That was me. It's written here in the score"
[choroba]: and shows a bar with a note "ohne Triangel"
[choroba]: where "ohne" means "will bend" in Czech

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2017-03-27 11:54 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (319 votes). Check out past polls.