RE:INPUT FIELD WITH NUMBERS AND DECIMALS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RE:INPUT FIELD WITH NUMBERS AND DECIMALS

Reddy, Gopikrishna
Hi Can anyone help me out in this
 
 
I Have an input fields where (max length of it is 7 ) I have to enter 5 numbers and 2 decimals in it how can i restrict this (First 5 digits mustbe numbers and last two digits must be decimals)
 
 
Thanks in advance,
K Gopikrishna Reddy
This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE:INPUT FIELD WITH NUMBERS AND DECIMALS

Hank Ratzesberger

Gopikrishna,

Again I think Regular Expression is your friend (or
cruel raja).  I can only make some guesses at what
a correctly matching expression will be without
considerable effort, although there are likely persons
who can with little thought, perhaps on a list dedicated
to RE.

If there are always at least one digit before the decimal:

matches( . , '[0-9]{1,5}?\.[0-9]{2}' )

And I'm sure I don't have that right the first time...

HTH,
Hank

On Apr 14, 2008, at 11:12 PM, Reddy, Gopikrishna wrote:

> Hi Can anyone help me out in this
>
>
> I Have an input fields where (max length of it is 7 ) I have to  
> enter 5 numbers and 2 decimals in it how can i restrict this (First  
> 5 digits mustbe numbers and last two digits must be decimals)
>
>
> Thanks in advance,
> K Gopikrishna Reddy
> This e-mail (and any attachments), is confidential and may be  
> privileged. It may be read, copied and used only by intended  
> recipients. Unauthorized access to this e-mail (or attachments) and  
> disclosure or copying of its contents or any action taken in  
> reliance on it is unlawful. Unintended recipients must notify the  
> sender immediately by e-mail/phone & delete it from their system  
> without making any copies or disclosing it to a third person.
>
> --
> You receive this message as a subscriber of the [hidden email]  
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws