The caret ^, when found at the start of a character set, is the equivalent to "not" in RegEx. The regular expression [^a-c] matches any characters except "a", "b" and "c". Write the regular expression that matches any characters except letters, digits and spaces. You must use a negated character set in your expression.
txt = " [email protected] "
pattern = "yourregularexpressionhere"
re.findall(pattern, txt) ➞ ["@", "."]
import re from the code.