title: regex to match variable declaration in java
body: <p>I want to parse a variable declaration statement and get the variable name. I am doing the below</p>
  
  <pre><code>String var = "private   String   ipaddress;";
  </code></pre>
  
  <p>i m using the regex pattern below to match the above string</p>
  
  <pre><code>.*private\\s+([a-z]*)\\s+([a-z0-9_]*);
  </code></pre>
  
  <p>It does not work. It says no match found Can any one please help.</p>