regex for negative and positive integers code example Example: regex pattern for positive numbers only ^[1-9]+[0-9]*$