import re


def compile_re(pattern):
    """ Compile a regular expression with pattern
    Args:
        pattern (str): a string representing the pattern
        e.g. "NoviPRD-.*" means strings that start with "NoviPRD-"
        e.g. ".*\.csv" means strings that end with ".csv"
        e.g. ".*xxx.*" means strings that contain "xxx" in the middle

    Returns:
        regular expression object
    """
    return re.compile(pattern)