def match_at(regex, s, offset):
    """
    Attempt to match a regex in string s at offset offset.
    Return index of match or null.
    
    """
    match = regex.search(s[offset:])
    if match:
        return offset + match.start()
    return None