Python Regex - How to remove text between 2 characters
Question: How can I remove anything between `")"` and `"|"`

For example,

    
    
    str = "left)garbage|right"
    

I need the output to be `"left)|right"`


Answer: 
    >>> import re
    >>> s = "left)garbage|right"
    >>> re.sub(r'(?<=\)).*?(?=\|)', '', s)
    'left)|right'
    
    >>> re.sub(r'\).*?\|', r')|', s)
    'left)|right'
    

