NewName: > Hello all. > I want to write a regex to check if a whole string is a number.
Also:
import std.stdio, std.string, std.array;
void main() {
string s = "123";
assert(s.removechars("0-9").empty);
}
Bye,
bearophile
NewName: > Hello all. > I want to write a regex to check if a whole string is a number.
Also:
import std.stdio, std.string, std.array;
void main() {
string s = "123";
assert(s.removechars("0-9").empty);
}
Bye,
bearophile