On Thursday, 3 March 2022 at 19:28:36 UTC, matheus wrote:
I'm a simple man who uses D with the old C mentality: import std.stdio; void main(){ string s, str = "4A0B1de!2C9~6"; foreach(i;str){ if(i < '0' || i > '9'){ continue; } s ~= i; } writeln("Result: ", s); } Result: 401296 Matheus.
mmm..but we no longer live in simple times ;-) (i.e. unicode)