def wrap_unsafe_or_pattern(pattern):
    """
    Wraps any pattern that contains an unsafe or operator inside an (?:...)
    """
    if '|' in pattern:
        return '(?:%s)' % pattern
    else:
        return pattern
