I am new to regex and python.
My patterns are
'Contact: Order Procesing'
'Contact: [email protected]'
'Contact: Opr & Packaging Supply'
'Contact: JOE (continued)'
'Contact: BOB/LORA/JACKIE'
'Contact: Ben - FTTC CER (continued)'
now I need to find the pattern to match contact and remove the entire string with a blank space.
re.findall(r"Contact:",text)
matches text with Contact. The problem is I do not know how to remove the Contact and right part of the Contact.
Is there any most efficient pythonic way to do this
print(re.sub(r"^Contact:.*", "", str))?str.replace("Contact: ","")