from typing import List
import re


def get_variable_in_string(content: str, variables: List[str]) -> set:
    """Get the subset of `variables` in ``content``."""
    used_variables = set()
    for variable in variables:
        pattern = f"\W{variable}\W"
        start = re.search(pattern, content)
        if start is not None:
            used_variables.add(variable)

    return used_variables