jump to navigation

Regular expression to test for integer July 31, 2007

Posted by maxmil in : Regular Expressions , trackback

Positive integer or empty: ^\d*$
Positive integer not empty: ^\d+$
Positive or negative integer or empty: ^((-\d+)|\d*)$
Positive or negative integer not empty: ^((-\d+)|\d+)$

Comments»

no comments yet - be the first?