I have a text file that contains email addresses and some information.
I would like to know how can I extract those email address using R or the terminal?
I\
Read your file into R and use grep.
myText <- readLines("your.file")
Emails <- grep("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$", myText, value=T)
This will return the whole line that the email appears on, if there is other information on that line you will need to split it up first using something like strsplit