I have multiple email addresses within a field and from the dataframe, I have to validate if the email address has @ .com and separated by a ; delimiter.
a
-----------------------------------------------
sample@email.com;sample2@email.com
sample
sample@email.com
sample2@email.com;test2@email.,sample@email.com
Expected output :
a a_new
---------------------------------------------------------
sample@email.com;sample2@email.com Valid
sample Invalid
sample@email.com Valid
sample2@email.com;test2@email.,sample@email.com Invalid
The 2nd and fourth records are invalid because of @ and .com are missing even for a single email address and for multiple email addresses test2@email., -> com is missing along with a different delimiter.
I was able to pull out for a single email address test. Not sure how to test if there are multiple email addresses.