import re


def parse_as_block(as_block):
    """Parse a string describing a block of autonomous system numbers,
    returning a tuple of the first and last numbers."""
    m = re.match(
        r"([Aa][Ss])?([0-9]+)\s*[-_/]\s*([Aa][Ss])?([0-9]+)$", as_block)
    if not m:
        return False
    return int(m[2]), int(m[4])