Wildcards - MS Word - Find replace entire line which has certain words

0

Saved emails from email extractor in text format. There are many 1000s of emails with 1 email per line. Some emails like [at]example.com and [at]mn.png must be removed from database/word file. How to do that in word? Can that be done in regex of email extractor itself ? Regex = ^a-zA-Z0-9-[^a-zA-Z0-9_-]

Macky Mac

Posted 2019-09-02T08:40:01.247

Reputation: 17

What do emails have to do with Word? Please better describe the problem. – harrymc – 2019-09-02T08:52:15.767

Edited. The emails have been saved from extractor in txt format. – Macky Mac – 2019-09-02T08:54:27.557

Answers

0

Word is not the right tool for text manipulation.

The simplest solution in Windows is the batch command findstr, for example:

findstr /v "@example.com" file.txt >file_without_example.com.txt

You can also use findstr with regex, using the /R option. For example:

findstr /v /r "^@example.com$" file.txt >file_without_example.com.txt

But there is an endless number of other utilities that can do the job.

harrymc

Posted 2019-09-02T08:40:01.247

Reputation: 306 093