sd3923
1
How can I test a variable for any non digit, but not match a decimal point. Right now I have:
if(/\\D/.test($variable)){
return false;
}
else {
return true;
}
how can I make the regex not match decimal points?
Thanks for any help.
This picks up more than one point even if they are not adjacent:
/[^0-9\\.]|(\\.[^\\.]*\\.)/
sd3923
3
I think that’s what I needed. Thanks.
sd3923
4
is there a way to change [^.0-9] to match more than 1 decimal point. so one decimal point would be ignored. but it would match a second?