Uses non-greedy quantifier to match the shortest possible string.
/<.+?>/g
const regex = /<.+?>/g; const result = str.match(regex);
import re pattern = re.compile(r'<.+?>') result = pattern.findall(text)
import "regexp" re := regexp.MustCompile(`<.+?>`) result := re.FindAllString(text, -1)