Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] RegExp for positive integer
- From: javascript@xxxxxxxxxx (Dan Costea)
- Subject: [Javascript] RegExp for positive integer
- Date: Thu, 23 May 2002 09:52:36 -0700
This is a multi-part message in MIME format.
------=_NextPart_000_002B_01C2023F.915FB900
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I want to define a regular expression for a positive integer. So I =
wrote:
var rePosInteger =3D /^(+)?\d+$/;
but I receive the error: "Expected quantifier". Can you tell me where is =
my mistake?
Thank you, Dan.
------=_NextPart_000_002B_01C2023F.915FB900
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2> Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I want to define a regular expression =
for a=20
positive integer. So I wrote:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>var rePosInteger =3D =
/^(+)?\d+$/;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>but I receive the error: "Expected =
quantifier". Can=20
you tell me where is my mistake?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you, =
Dan.</FONT></DIV></BODY></HTML>
------=_NextPart_000_002B_01C2023F.915FB900--
- Follow-Ups:
- [Javascript] RegExp for positive integer
- From: Dan Costea
- [Javascript] RegExp for positive integer
- Prev by Date: [Javascript] Active element
- Next by Date: [Javascript] RegExp for positive integer
- Previous by thread: [Javascript] How to refresh opener window ??
- Next by thread: [Javascript] RegExp for positive integer
- Index(es):