Test, validate and match regular expressions
Matches a single number or a numeric range consisting of two numbers separated by a hyphen. Accepts integers and decimals (e.g., '5', '3.14', '1-10', '2.5 - 7.5'), allowing optional whitespace around the values and the hyphen. Captures the first and second numbers in separate groups, making the second group undefined for single values. Commonly used for validating user input like price ranges, quantity limits, or page intervals.