This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Nakuli Patidar wrote:I have String : "extend cup end table"
case 1:If i use patter "e.+d" it will find() match: extend cup end
case 2:If i use patter "e.+?d" it will find() match: extend end
Also, you should also mention that your find() method calls are in a loop -- and in the second case, it is not a single result. The way you worded your question, you can confuse some beginners to regular expressions.