title: Example for java regex X?? ,X?+ and X?
body: <p>can someone give difference between <code>X?</code> ,<code>X?+</code> and <code>X??</code> with java example. 
  where <code>X?</code>,<code>X?+</code> and <code>X??</code> are <code>java.util.regex.Pattern</code>.</p>
  
  <p>for all three patterns they have given same explanation (<code>X</code>, once or not at all)
  reference <a href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html" rel="nofollow noreferrer">http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html</a></p>
  
  <p>I am not able to find good example in internet</p>
  
  <p>Note: today morning I asked part of question here: <a href="https://stackoverflow.com/q/18757185/1065197">what is the difference between the patterns X? and X?</a>, since I have an updated posting it again</p>