import re


def _get_repo_param(pattern, repo_params_raw, param):
    """Parse a string with all the repo params to get the value of a single repo param."""
    repo_param = re.search(pattern, repo_params_raw, re.MULTILINE | re.DOTALL)
    if repo_param:
        return repo_param.group(1)
    raise ValueError(param, repo_params_raw)