Combining multiple regex substitutions
===

I'm trying to delete some things from a block of text using regex. I have all of my patterns ready, but I can't seem to be able to remove two (or more) that overlap.

For example:

    import re
    
    r1 = r'I am'
    r2 = r'am foo'
    
    text = 'I am foo'
    
    re.sub(r1, '', text)   # Returns ' foo'
    re.sub(r2, '', text)   # Returns 'I '

How do I replace both of the occurrences simultaneously and end up with an empty string?