Test, validate and match regular expressions
This regex matches integers and floating-point numbers, including optional leading signs (+ or -), within polynomial expressions. It carefully avoids matching numbers that are part of function calls or identifiers by using negative lookaheads. It's designed for extracting numeric coefficients from polynomial or algebraic expressions.