import re


def _read_chunk(anchor, pat, data):
    """Read in delimited chunks of data based on an anchor at the start
    of the chunk and a pattern for recognizing a chunk.

    @param anchor (str) The anchor string at the start of the chunk to
    identify.

    @param pat (str) The regex pattern for identifying a chunk.

    @param data (str) The data from which to pull chunks.

    @return (list) A list of recognized chunks (str).

    """
    
    if (anchor not in data):
        return None
    data = data[data.index(anchor):]
    if (re.search(pat, data, re.DOTALL) is not None):
        return re.findall(pat, data, re.DOTALL)
    return None