Forum Discussion
Kevin_Stewart
Aug 28, 2013Employee
There are actually many ways to do this, some static (like string map), and some dynamic (like regsub),
% time { regsub {%\d+} $ip "" } 1000
1.996 microseconds per iteration
% time { string map {%1 ""} $ip } 1000
0.661 microseconds per iteration
But then you have to be careful that the function you use doesn't negate the performance benefits of not modifying it at all.