How can I grep out only the email address using a regex from a file with multiple lines similar to this. (a sql dump to be precise)
Unfortunately I cannot just go back and dump the email column at this point.
Example data:
62372,35896,1,cgreen,Chad,Green,cgreen@blah.com,123456789,0,,,,,,,,,3,Blah,,2013-05-02 17:42:31.659574,164842,,0,0
I have tried this but it did not work:
grep -o '[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}' file.csv
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…