I'm replacing a pattern in a string like $data =~ s/(nr\d+)/calc\($1\);/gi;
I get pairs like "calc(nr45);". Next I want to replace only the remaining characters in the string like $data =~ s/(\d+)/$1*4/ge but without modifying the first ones. So if the string is "hello nr34 , 56, hi" I want to get "calc(nr34);" and modify "56" to 56*4... Is there a straight way to do this?Thanks
KeplerIn reply to String substitution by kepler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |