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.