Im trying to figure out how to filter out emails from
a form. Its working to a degree in that if the email address
is staggered from a name it works and pulls the address
perfectly. However, if the email address is on the same
line it will print out the entire line
such as "Pollbjhock, Juhjklia jpolcghock@ms.org"
I am trying to get this file to just extract
the emails and nothing more..any advice as to
whats missing?
This is because you are extracting email on the basis of @,this one is correct but you need to put more checks like after getting the position of @ you need to look for space for the current scenario
"Pollbjhock, Juhjklia jpolcghock@ms.org" for this you need to extract the sub string.