sed - How To Remove lines with non-ALPHANUMERIC characters with exceptions from an email list -


i used following code on text file /n delimiter has 40 million lines.

'egrep -e -i [[:alnum:]._@] file > temp && mv temp file'

i need use bre.

apparently, after doing this, still able find several lines contained / ; -, supposed not acceptable characters. . _ @ acceptable non-alphanumeric characters.

i use like:

'sed -e '/string/d' file > temp && mv temp file

what proper command carry out using bre?

using sed:

sed -n -e '/@/p' -e '/^[[:alnum:]]*$/p' your_file 

technically speaking, email detection using re not nice. anyways, have software.

http://davidcel.is/posts/stop-validating-email-addresses-with-regex/


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -