import re


def remove_from_polymer(polymer, unit):
    """Remove all occurrences of unit, regardless of polarity from polymer."""
    regex = f'{unit}'
    return re.sub(regex, '', polymer, flags=re.IGNORECASE)