import re


def _is_bed_row(bed_row):
    """Checks the format of a row of a bedfile.
    The logic is to check the first three fields that should be
    chromosome start end."""
    if len(bed_row) < 3:
        return False
    return (
        (re.match(r"^chr.+$", bed_row[0]) is not None)
        and (re.match(r"^[0-9]+$", bed_row[1]) is not None)
        and (re.match(r"^[0-9]+$", bed_row[2]) is not None)
    )