[Solved] How do I setup regex to accept only [digit][white space][operator]?


Something like this worked for me, I hope it helps:

([0-9]+ [+,\-,*,\/])/g

This way it will return every occurance that matches [number][whitespace][operator]. Tested here Regex Tester

0

solved How do I setup regex to accept only [digit][white space][operator]?