Try it out on these example inputs:

back to RegexSwap.

Integer

Regular expression:

^[-+]?[1-9][[0-9]]*$

Categories:

Popularity:

You need to be logged in to cast votes on regexes.

Good
1
Bad
1

Author description and comments (0)

Topic by
beno

2009-01-06
14:56

Description

This regex matches positive and negative integers and nothing else.

You need to be logged in to participate

In order to post your own comments on this regex, you need to be logged in.

Username:

Log in by clicking the login link at the top of the screen