Filter text (email) before @

I’ve to comparise 2 columns of email-addresses with different domains (the top-level, like google.com and yahoo.com).

have the same text before the @.

should give an error.
How can i filter only the text before the @, when the length is different. =left isn’t working on this.

Something like

=LEFT("foobar@google.com";FIND("@";"foobar@google.com")-1)   

extract up to character before the first @ in the email address.