Click to See Complete Forum and Search --> : Regexpr


fabi
08-04-2003, 11:06 AM
How I define one regexp with the following rule? The first one caracter must be a number or the letter ' p ' and the too much characters must be numerical.
This will be being verified in onkeypress.

Jeff Mott
08-04-2003, 11:25 AM
and the too much characters must be numericalI'm taking this to mean all characters after the first must be numerical digits./[\dp]\d+/i

Charles
08-04-2003, 02:21 PM
I think that you need something more like /^[\dp]\d+$/i.