Please enable / Bitte aktiviere JavaScript!
Veuillez activer / Por favor activa el Javascript![ ? ]
How to delete a text file from the rows not containing certain characters? - bug-code.com Q&A

How to delete a text file from the rows not containing certain characters?

0 like 0 dislike
13 views
Hello. In the file each line should contain "yandex" or "google". If not, then the line to delete. What to do?
asked by | 13 views

2 Answers

0 like 0 dislike
notepad++
How to delete rows using bookmarks
1. Menu -> Search -> Tagging -> [enter what you're looking for] -> bookmark (put check mark) -> Mark all
2. Menu -> Search -> Bookmark -> Remove all lines Without tabs

PS: [enter what you're looking for] - can I have regex expression and enter: yandex|google
answered by
0 like 0 dislike
Bash/Cygwin:
grep -E-v "(yandex|google)" < in.txt > out.txt
answered by
Welcome to Bug-code Q&A, where you can ask questions and receive answers from other members of the community.

24.8k questions

46.2k answers

0 comments

13.3k users

24,788 questions
46,220 answers
0 comments
13,322 users