Test, validate and match regular expressions
Validates a 16-bit signed integer, matching values in the range -32768 to 32767 (or 0 to 32767 for unsigned values). An optional leading minus sign handles negatives, while chained alternations enforce the 32767/32768 upper boundary digit by digit. With global/multiline flags enabled, it is useful for validating smallint fields, port numbers, or any 16-bit range check line by line.