Forum Discussion
nitass
Employee
is tcl scan useful?
e.g.
% set test1 "10.10.10.10%1"
10.10.10.10%1
% set test123 "10.10.10.10%123"
10.10.10.10%123
% scan $test1 {%[^%%]%%%d} a b
2
% put $a
10.10.10.10
% put $b
1
% scan $test123 {%[^%%]%%%d} a b
2
% put $a
10.10.10.10
% put $b
123
%
Aurel
Aug 29, 2013Cirrus
Yes Nitass, this is doing the job fine. That's seems fine.
As Kevin said, it looks that is using regex and then will consume CPU a little more than "tcl native" commands.
Am i right ? I'd like (as far as possible) to do this with the fewest impact on performance.