I have a String which looks like
"<name><address> and <Phone_1>"
.* in a regex is greedy. It will match as many characters as possible between the first
< it finds and the last possible
> it can find. In the case of your string it finds the first
<, then looks for as much text as possible until a
>, which it will find at the very end of the string.
You want a non-greedy or "lazy" pattern, which will match as few characters as possible. Simply
<(.+?)>. The question mark is the syntax for non-greedy. See also this question.