def check_port_in_port_range(expected_port: str,
                             dest_port_range: str):
    """
    Check if a port is within a port range
    Port range maybe like *, 8080 or 8888-8889
    """

    if dest_port_range == '*':
        return True

    dest_ports = dest_port_range.split('-')

    if len(dest_ports) == 1 and \
       int(dest_ports[0]) == int(expected_port):
        return True

    if len(dest_ports) == 2 and \
       int(dest_ports[0]) <= int(expected_port) and \
       int(dest_ports[1]) >= int(expected_port):
        return True

    return False