def _strip_regex(pattern, text, preserve_lines):

    def remove_comments(group, preserve_lines=False):
        """Remove comments."""

        return ''.join([x[0] for x in LINE_PRESERVE.findall(group)]) if preserve_lines else ''

    def evaluate(m, preserve_lines):
        """Search for comments."""

        g = m.groupdict()
        return g["code"] if g["code"] is not None else remove_comments(g["comments"], preserve_lines)

    return ''.join(map(lambda m: evaluate(m, preserve_lines), pattern.finditer(text)))
Returns the default paths to use for various configuration options for this platform.
dataset/ETHPy150Open facelessuser/ThemeScheduler/lib/file_strip/comments.py/_strip_regex--crossover with--dataset/ETHPy150Open scalyr/scalyr-agent-2/scalyr_agent/platform_controller.py/PlatformController.default_paths