from typing import Tuple
import re


def do_substitution(content: str, pattern_sub: list[Tuple[re.Pattern, str]]) -> str:
    """Do the substitution using pattern and sub."""

    for pattern, sub in pattern_sub:
        content = pattern.sub(sub, content)

    return content