import re


def top_level_separator_regex(separator):
    """Returns a regex that matches separators in only the top level of a string
    (i.e. no separators found within parenthetical statements)."""
    sep_pattern = re.escape(separator)
    return sep_pattern + r'(?![^\(]*\))'