import re


def find_classes(string, match_objects: bool = False):
    """Find all class references in a string and return a list of strings or match objects."""
    if match_objects:
        result = list(re.finditer(r"<([^>]+)>", string))
    else:
        result = [c.group()[1:-1] for c in re.finditer(r"<([^>]+)>", string)]
    return result