import re
import threading


def get_active_threads_name_with_prefix(prefix: str):
    """
    Retrieves the threads name that starts with `prefix` and are active.
    """
    prefix_regex = re.compile(f"^{prefix}")
    return [thread.name for thread in threading.enumerate() if prefix_regex.match(thread.name)]