Integers
The following regular expressions can be used for matching integers:
Expression:\b\d+\b
Description:
Matches integers
Test Matches:
123456 1 2 3 4 5 6 +12346 -12346 123. .456 1,234.56 123.456 +123.456 -123.456
Expression:
(?<!\S)\d++(?!\S)
Description:
Matches integers
Sample Matches:
123456 1 2 3 4 5 6 +12346 -12346 123. .456 1,234.56 123.456 +123.456 -123.456
Expression:
[-+]?\b\d+\b
Description:
Matches integers with an optional sign
Sample Matches:
123456 1 2 3 4 5 6 +123456 -123456 123. .456 1,234.56 123.456 +123.456 -123.456