Matching a number
Hi,
I'd like to validate a number input using a regular expression. This
would be done by "\d*". Now the input may have a fdecimal separator,
wich would be matched by "\d*(\.|,)\d*" (allowing the , as separator as
well).
What I need know is to ensure, that the total length of the string does
match a fixed length. Without the decimal separator this is trivial, but
with decimal separator I am stuck, as I am not too deep into regular
expression syntax.
TIA,
Tobi
Date:Thu, 23 Aug 2007 17:13:11 +0200
Author:
|
Re: Matching a number
On Aug 23, 4:13 pm, Tobias Schröer
wrote:
> I'd like to validate a number input using a regular expression.
Does it *have* to be a regular expression? Are you doing this using
some component which requires a regular expression, or could you split
it into a regular expression and a length check?
Jon
Date:Thu, 23 Aug 2007 08:26:44 -0700
Author:
|