import re


def normalize_subject(subject):
    """
    Strips any leading Re or Fwd from the subject, and returns it. This is
    sometimes useful for grouping messages.
    """
    return re.sub(r'(?i)(re:|fw:|fwd:)\s+', '', subject)