Test, validate and match regular expressions
Matches a single digit from 0 to 9, or a sequence of digits from 1 to 9, effectively preventing leading zeros in integers. It is applied on a line-by-line basis using multiline flags. Note that because the second alternative uses an asterisk, this pattern will also match an empty string.