Java Regex - remove remaining portion of sting after a math operator
<p>I need a regular expression that will remove the remaining characters after an operator.
User passes in an equation, ex 55-6  OR  55+6 OR ( * / ).</p>

<p>Just need a regex that reads until one of those characters are hit, and remove the rest.</p>

<p>Ive got the divide '/' figured out: <code>x = input.replaceAll("/[^/]*$", "");</code> 
I try following this same convention, but it doesnt work.</p>

<p>I looked at some of the other questions, but they all rely on knowing the specific character. In this case, I dont know what operator the user will pass in.</p>

<p>Thanks in advance.</p>