I am using the following RegEx to basically filter out any text, and accept numeric + operators.
([-+]?[0-9]*\.?[0-9]+[\/\+\-\*])+([-+]?[0-9]*\.?[0-9]+)
So it grabs 1+1, 1-1, 2*2, 10/2, etc.. Since the solution I am writing doesn't just evaluate the expression on the row, but it totals all calculated rows in a total, I need to allow for users to put stand alone positive/negative numbers that will affect the total (500, -500, +500 (fool proofing)).
Here is the test I've been running. I need to be able to match on the +500, -500, and 500 in the test cases while still excluding any text. I am absolutely terrible with RegEx, so any help is greatly appreciated!