How to write a regular expression correctly?
In the string, you need to replace everything that is not numbers with a blank, the equal sign = and plus +
To do this, I need a regular expression "everything that is not numbers, replace the equal sign and the plus sign with empty space.
replace (reg, "")
I can leave only plus I can separately - (/ [^ +] / g)
and only numbers I can - (/ [^ 0-9] / g)
(/ [^ 0-9 + =] / g)Jack Valentine
To place the code, please use CodePen or similar tool. Thanks you!