It needs a major modification, since matching an integer is required. The accepted answer \d+ involves only "positive" integers. But -333 or +777 are also integers, which leads to two possible solutions with the last one being the most accurate:
-?\d+ :
The hyphen (optional minus sign) and a digit 1 or more times.
To include the negatives.
[+-]?\d+ :
Optional + or - and the quantity of more than 0 digits.`