How to remove all characters from a string, except the integers?

Salih Dincer salihdb at hotmail.com
Fri Mar 4 09:53:15 UTC 2022


On Friday, 4 March 2022 at 07:55:18 UTC, forkit wrote:
> If you get this question at an interview, please remember to 
> first ask whether it's ascii or unicode 😀

```d
auto UTFsample = `
1 İş 100€, 1.568,38 Türk Lirası
çarşıda eğri 1 çöp 4lınmaz!`;

UTFsample.splitNumbers.writeln; // [1, 100, 1, 568, 38, 1, 4]
```


More information about the Digitalmars-d-learn mailing list