from typing import List


def _make_citation_command_regex(commands: List[str]) -> str:
    """
    A citation command typically has this structure:
    \\command[prenote][postnote]{keys}[punctuation]
    where prenote, postnote, and punctuation are all optional.
    Reference: https://ctan.math.illinois.edu/macros/latex/contrib/biblatex/doc/biblatex.pdf
    """
    command_names = r"(?:" + "|".join([r"\\" + c for c in commands]) + ")"
    return command_names + r"(?:\[[^\]]*\]){0,2}{([^}]*?)}(?:\[[^\]]*\])?"