Forum Discussion
hooleylist
Aug 13, 2007Cirrostratus
Hello,
'string map' doesn't seem to accept wildcards, so the best option I can think of would be to use regsub.
Here's an example:
% set mixed_string abcd1234abcd
abcd1234abcd
% set digits [regsub -all {[a-zA-Z]} $mixed_string ""]
1234
Here are a few related manual pages:
string Click here
regsub Click here
Else, you might be able to use scan:
scan Click here
Aaron