Home » Questions » Computers [ Ask a new question ]

regex for searching a word in a word

regex for searching a word in a word

i have a csv file which i need to filter mails marked with the word 'spam' lines look like this

Asked by: Guest | Views: 252
Total answers/comments: 1
Guest [Entry]

Try grep -e "^[^;]*spam[^;]*;"