As this point in a code segment, i want to limit the text entered to only digits and periods.
I have everything working, but i wanted to shortcircut my code so that if it finds a NON DIGIT it will just return. a PERIOD (.) is labelled as a non-digit. Is there a way to just say something like NON_DIGITS_LESS_PERIOD or something?
i was thinking
/\D[^\.]/
but that actually looks for a non digit followed by a non-period.
Thoughts on how to limit it as i am trying?
So you actually want a NON_(DIGIT_OR_PERIOD):
Btw, it might be easier to match against
/^[\d.]*$/.