Test, validate and match regular expressions
Matches binomial expressions of the form (ax+b)^n enclosed in parentheses, capturing named groups for the coefficient 'a', an optional sign before the variable, the variable letter, the constant term 'b', and an optional exponent 'n'. Useful for parsing user input in binomial theorem expansion tools, math homework apps, or algebraic calculators handling forms like (2x+3)^5 or (-y-7).