title: Parsing JavaScript code in Java to retrieve variables' names
body: <p>I have a Java <code>String</code> that contains javascript code, and i need to extract all the javascript <code>var</code>s' names.</p>
  
  <p>So, for the following javasctipt:</p>
  
  <pre><code>var x;
  var a,b,c,d;
  var y = "wow";
  var z = y + 'x';
  </code></pre>
  
  <p>I need to get <code>"x,a,b,c,d,y,z"</code> as a result.</p>
  
  <p>I dont need to get their values, just their names.</p>