Test, validate and match regular expressions
This regular expression matches optional positive or negative signs followed by integers and floating-point numbers. It is specifically designed to extract numeric coefficients from mathematical expressions or polynomials. The pattern uses negative lookaheads to carefully avoid matching numbers that are adjacent to variables, letters, or function calls.