I want to match the emails in following texts,
uma@cs.stanford.edu - match
uma at cs.Stanford.edu - match
http://infolab.stanford.edu/~widom/yearoff.h
we
genale.stanford.edu
n <A href="mailto:cheriton@cs.stanford.edu - match
hola @ kirti.edu - match
Now I want to capture 2 parts of email address only like (uma) and (cs.stanford) in the email uma@cs.stanford.edu.
My current pattern is :
(\w+)[(\s+at\s+)|(\s*@\s*)]+(\w+|\w+\.\w+).edu
But it matches the string - infolab.stanford.edu
- which I don't want.
Can anybody suggest any modification on this?