Build, test, and debug regular expressions
This regular expression matches mathematical exponentiation expressions where a base number is raised to the power of an exponent, like 2^3 or (1.5)^2. It captures both the base and exponent into separate groups, accommodating positive decimal and integer values. Optionally, the numbers can be enclosed in parentheses, making it useful for parsing equations.