[Javascript] RegExp for positive integer

Dan Costea costea.dan at ssi-schaefer.ro
Thu May 23 12:56:05 CDT 2002


I found it! the correct RegExp is: var reSignedInteger = /^\+?\d+$/;

  ----- Original Message ----- 
  From: Dan Costea 
  To: javascript at LaTech.edu 
  Sent: Thursday, May 23, 2002 9:52 AM
  Subject: [Javascript] RegExp for positive integer


      Hi,

  I want to define a regular expression for a positive integer. So I wrote:

  var rePosInteger = /^(+)?\d+$/;

  but I receive the error: "Expected quantifier". Can you tell me where is my mistake?


  Thank you, Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20020523/0a505357/attachment.htm>


More information about the Javascript mailing list