Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. Share your own thoughts and experience, accounts may be terminated for violations.

Stripping email

Status
Not open for further replies.

Jrc

Joined
Oct 11, 2007
Posts
27
Reaction score
0
Firstly, sorry this post is probably not what you thought the title suggested.

I have a large text file of data and every now and again there is a bit which says

"EMAIL [email protected]"

Is there any software that can strip all the emails out or is it a case of it is best to write my own program?
 
Any text editor which allows you to use regular expressions

Search: Email \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b
Replace:
 
#!/bin/bash
grep EMAIL file > file2
for i in `cat file2`; do
ADDY="`echo $i | cut -d \" \" -f 2`"
echo $ADDY >> list
done

Something along those lines should work...
 
Status
Not open for further replies.
Top Bottom