|
 |
javascript thread: SV: RE: 3 digit postive integer using regular exp
Message #1 by =?iso-8859-1?Q?Martin_N=2E_S=F8rensen?= <mns@w...> on Mon, 15 Apr 2002 15:33:33 +0200
|
|
Then what happens if the number is "104" or "120" or "200" ????
-----Oprindelig meddelelse-----
Fra: Oleg Kapeljushnik [mailto:c-oleg.kapeljushnik@w...]
Sendt: 15. april 2002 15:34
Til: javascript
Emne: [javascript] RE: 3 digit postive integer using regular exp
Hi !
Try this pattern :
var reg =3D /^[1-9]?[1-9]?[0-9]$/;
I think this is what you was looking for.
Oleg.
-----Original Message-----
From: speedguru@m... [mailto:speedguru@m...]
Sent: April 15, 2002 6:59 AM
To: javascript
Subject: [javascript] 3 digit postive integer using regular exp
hi,
I've been trying to find an exprssion to match any number between 1 and
999 i tried ^\d+$ , which works fine but allows 003. can the reg ex
gurus help me out...
tfyt
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
|
|
 |