REGEX: Delete the content of all files that do not contain the word/words
Use the following:
- Ctrl+Shift+F
- Find what:
\A(?:(?!\bMIRELA HOME\b).)*\z
- Replace with:
LEAVE EMPTY
- Filters:
Whatever you want
- Directory:
Path\where\your\files\are
- CHECK Match case
- CHECK Regular expression
-
CHECK
. matches newline
- Replace in Files
Explanation:
\A # beginning of file
# Tempered Greedy Token
(?: # non capture group
(?! # negative lookahead
\b # word boundary
MIRELA HOME # string to find
\b # word boundary
) # end lookahead
. # any character
)* # end group, mayy appear 0 or more times
\z # end of file