Remove the outermost parens

    >>> unpack(r'(abc)')
    'abc'
    >>> unpack(r'(?:abc)')
    'abc'
    >>> unpack(r'(?P<xyz>abc)')
    'abc'
    >>> unpack(r'[abc]')
    '[abc]'

def danger_unpack(regex):
    """
    Remove the outermost parens

    >>> unpack(r'(abc)')
    'abc'
    >>> unpack(r'(?:abc)')
    'abc'
    >>> unpack(r'(?P<xyz>abc)')
    'abc'
    >>> unpack(r'[abc]')
    '[abc]'
    """

    if is_packed(regex):
        return re.sub(r'^\((\?(:|P<.*?>))?(?P<content>.*?)\)$', r'\g<content>', regex)
    else:
        return regex