title: Extract equation in bunch of code in Java
body: <p>I have a Java project which required to extract mathematical equation from bunch of code that entered by users. For example, the user has keyed in the following code in the <code>jTextArea</code>:</p>
  
  <pre><code>public void setTest(int i)
  {
      int j;
      j=i+i;
  }
  </code></pre>
  
  <p>So, how do I can get the equation of:</p>
  
  <pre><code>j=i+i;
  </code></pre>
  
  <p>from the above user input since it is in form of String?</p>