from typing import List
import re


def remove_toc_header(lines: List[str]) -> List[str]:
    """
    Filters a list of lines to remove the existing toc header.
    Identifies toc header using regex pattern.
    :param lines: List of toc header and text lines.
    :returns: List of text lines.
    """

    toc_elements = []
    re_toc_header = r"^\#\ (Table\ of\ Contents\ *|TOC*)$"
    toc_cleaned = []

    for i, line in enumerate(lines): 
        # identify toc elements by pattern 
        if re.search(re_toc_header, line): 
            toc_elements.append(line)
        else:
            toc_cleaned.append(line) 

    return toc_cleaned