I'm using a math parser that uses % as the mod symbol. I'd like to use it for the percent symbol instead to allow users to type "25%*10" or "25% of 10" and receive the answer "2.5" (they could type anything). I'd then use the regex asked for to get the "25%" (could be in any part of the string) and do a simple calculation (25 / 100) and then replace the 25% in the string with the calculated value to pass to the math parser. Basically I'm doing some pre calculations on the number in front of the percent symbol before passing the full string to the math parser. I've always struggled with regex and was hoping someone could help me.
Thanks,
John