def find_indentation_match(lines,lineno,pattern):
    """
    Find the first line that matches the specified pattern and isn't an empty line
    Return None if there aren't any lines found.
    """
    while lineno < len(lines):
        if len(lines[lineno].strip()) == 0:
            lineno += 1
        else:
            return pattern.match(lines[lineno])
    
    # if we got here, we ran out of lines
    return None