T
Trev
Hi everyone,
I'm having some problems with my regular expressions in C# and was
wondering if anyone could help?
Basically, what I'm trying to do is check for numerical only input -
either integer, or double,
so I need to check for 1234, 1234.5 etc.
The integer check I think is as follows:
Match m = Regex.Match( MyString, "^[0-9]*$");
but I'm having problems checking for anything with a decimal point in
it
Match m = Regex.Match( MyString, "^[0-9]*/\.{0,1}/[0-9]*$");
- the compiler grumbles about unknown tokens and syntax errors.
TIA
Paul
I'm having some problems with my regular expressions in C# and was
wondering if anyone could help?
Basically, what I'm trying to do is check for numerical only input -
either integer, or double,
so I need to check for 1234, 1234.5 etc.
The integer check I think is as follows:
Match m = Regex.Match( MyString, "^[0-9]*$");
but I'm having problems checking for anything with a decimal point in
it
Match m = Regex.Match( MyString, "^[0-9]*/\.{0,1}/[0-9]*$");
- the compiler grumbles about unknown tokens and syntax errors.
TIA
Paul