Test, validate and match regular expressions
Matches any digit that stands completely alone, using a negative lookbehind and negative lookahead to ensure the digit is neither preceded nor followed by another digit. For example, it matches the '5' in 'a 5 b' but finds no match in '123', since those digits are part of a multi-digit number. Useful for extracting isolated single-digit values such as list indices, single-digit versions, or standalone counters while ignoring multi-digit numbers. The 'g' flag finds all matches and 'm' enables multiline matching.