in reply to Making multiple replaces through Regex
Hi rsriram,
It is working fine for me. If I am wrong somewhere, please correct me. Below is a sample code.
$s = '<csp c="3">'; $s =~ s/<csp c="(\d+)">/"<colspec colnum=\"1\" colname=\"col1\"\/>\n" +x $1/egs; print $s; output: -------- <colspec colnum="1" colname="col1"/> <colspec colnum="1" colname="col1"/> <colspec colnum="1" colname="col1"/>
Prasad
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Making multiple replaces through Regex
by rsriram (Hermit) on Nov 27, 2008 at 06:18 UTC |
In Section
Seekers of Perl Wisdom