import re


def get_active_port(flows):
    """Find the active port name based on knowledge that down stream traffic is only output to the 'nic' interface.

    Args:
        flows (dict): Open flow details of the mux, result returned from function get_flows

    Returns:
        string or None: Name of the active port or None if something is wrong.
    """
    for in_port in flows.keys():
        if not re.match(r"(m|mu|mux|muxy)-", in_port):
            return in_port
    return None