title: JAVA Regular expression to extract string after special characters
body: <p>I need to extract string after the first three dots (example yyyy in following pattern):<code>xxx.xxx.xxxx.yyyy</code>
  here x could be anything (no,letters or <em>)
  yyyy can be letter or nos or abc. or abc</em></p>
  
  <p>On using java pattern "<code>^.*\\.([^.]+)$</code>" , it works fine for string ab.bc.de.ef :
  Code: </p>
  
  <pre><code>static final String REC_PATTERN = "^.*\\.([^.]+)$";
  Pattern pattern = Pattern.compile(REC_PATTERN);
  Matcher m = pattern.matcher("ab.bc.de.ef");
  System.out.println(m.group(1)) //out put ef.
  </code></pre>
  
  <p>but it fails for <code>ab.bc.cd.de.11111</code> , I require output as de.1111 instead of 1111.
  Could someone please help with relevant regular expression?</p>