Suppose I am given a string like:
input = """
[email protected] is a very nice person
[email protected] sucks
[email protected] is pretty funny."""
I have a regular expression for email addresses: ^[A-z0-9\+\.]+\@[A-z0-9\+\.]+\.[A-z0-9\+]+$
The goal is to split the string based on the email address regular expression. The output should be:
["is a very nice person", "sucks", "is pretty funny."]
I have been trying to use re.split(EMAIL_REGEX, input) but i haven't been successful.
I get the output as the entire string contained in the list.
inputas a variable name.