How do I search only files that do not contain specific word in filename

0 votes

In "File name" field, I have this regular expression: .[^log].\.txt

On my monitor, the pattern above does not show the asterix in the question. The pattern is:
'dot' + 'asterix' + '[^log]' + 'dot' + 'asterix' + 'backslash' + 'dot' + 'txt'

I'm searching for text in filename that do not contain the word 'log'. Example of filename:

Report[12345]_002.txt   -----> this is the file I want to search text into


The text I'm searching for is in both files, but I'm only interested in the file that does not contain 'log' in its name. However, the search results gives me both files.

In real searches, I have hundreds of file (not just the 2 examples above).


asked Nov 18, 2015 by Guillaume Lalonde (50 points)
edited Nov 18, 2015 by Guillaume Lalonde

1 Answer

0 votes

I think you've misunderstood the negated character class. The regex


translates as 'any character except L, O, or G'

You're probably better off with a DOS expression:

answered Nov 18, 2015 by dave (53,670 points)