Both will match any sequence of one or more characters. The difference is that:
.+is greedy and consumes as many characters as it can..+?is reluctant and consumes as few characters as it can.
See Differences Among Greedy, Reluctant, and Possessive Quantifiers in the Java tutorial.
Thus:
e.+dfinds the longest substring that starts witheand ends withd(and contains at least one character in between). In your exampleextend cup endwill be found.e.+?dfind the shortest such substring. In your example,extendandendare two such non-overlapping matches, so it finds both.