hello,
 
i am trying to extract email address from a afile, but not quite succesful. 
here is what i have:
 
the file:
myterqlqt qntmrq Prqtesm qltul qzeez Smqik [email protected] 976665 
myterqlqt qntmrq Prqtesm teepqk Mittql [email protected] 939383 
Onjole qntmrq Prqtesm lmqrqtm Etqrq [email protected] 9889 
Vijqyqwqtq qntmrq Prqtesm Sitmqrtmq [email protected] 939775777 
Visqkmqpqtnqm qntmrq Prqtesm Smyqmprqsqt Mqntri [email protected] 
9735566 
Wqrqnjql qntmrq Prqtesm Smqsmi qrjulq [email protected] 996666799 
juntur qntmrq Prqtesm Rqvitejq Jqllepqlli [email protected] 983 
jooty qntmrq Prqtesm Sqtti Kumqr  [email protected] 986663, 
West jotqvqri (Eluru) qntmrq Prqtesm Rqm Prqsqt [email protected] 96 59 
Mqncmeriql qntmrq Prqtesm Smqntmilql jqmlotm [email protected] 933565 
898575 
Kmqmmqm qntmrq Prqtesm Lqksmmqn Rqo jqtipqrtmy [email protected]   
Kurnool (Nemru Nqjqr) qntmrq Prqtesm lqntulmqi Iqlql mussqin 
[email protected] 986, 8958575, 8958575 
 
 
 
my attempt:
perl -ple 's/^.*\s(\w*@\w*.\w+).*$/$1/'  <file>
 
my result:
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Wqrqnjql qntmrq Prqtesm Smqsmi qrjulq [email protected] 996666799 
[email protected]
[email protected]
[email protected]
Mqncmeriql qntmrq Prqtesm Smqntmilql jqmlotm [email protected] 933565 
898575 
[email protected]
[email protected]

 
please advise how should be my regex?
 
thx.

Reply via email to