Regex in a calculator app

Hi, I am creating a basic calculator app but the backspace(delete) functionality doesn’t seem to work right.

I am storing the values in a text custom state called EXPRESSION.
When the backspace is clicked, I want the last value in the custom state EXPRESSION to be removed and I am doing that with the toolbox plugin using find&replace and performing a regex pattern on it as in the image below
MATHmmm

Any help please???

Hi there, @ericwillcampbell3… I don’t pretend to know much about regex, but I just did a quick test, and using .$ for the regex pattern appears to do the trick. So, give that a shot and see if you get the desired result.

Best…
Mike

Thanks MIKE… it worked perfect

1 Like