import re


def get_single_junction_overhang(cigar):
    """
    Returns the number of reads left/right of a junction as indicated
    by the LEFTMOST N in a cigar string. Return -1, -1 for reads that don't span
    junctions.

    :param cigar: string
    :return left: int
    :return right: int
    """
    cigar_overhang_regex = r"(\d+)M[\d]+N(\d+)M"

    overhangs = re.findall(cigar_overhang_regex, cigar)
    if overhangs:
        return int(overhangs[0][0]), int(overhangs[0][1])
    else:
        return -1, -1