Page 1 of 1

Please help: Regular expressions

Posted: Wed Feb 17, 2016 11:09 pm
by 00
Please tell me what I'm doing wrong.

I want to find duplicate .png files in subdirectories below 'L:\Pictures\'

So I'm using the Selection Assistant: 'Select by text pattern' where column name = path.

I've set the regexpression = ^L:\\Pictures\\.*\\*.png$

eg. this file should match - 'L:\Pictures\abc\def\ghi\jkl.png' but it doesn't.

The expression works in this online tester: https://regex101.com/r/fW4aL8/1
but it doesn't in Duplicate Finder. Any help would be appreciated. Thanks.

Re: Please help: Regular expressions

Posted: Thu Feb 18, 2016 5:28 pm
by therube
Can't answer on the regex end, but why are you even needing regex in this case?

Why not set the Location: to L:\Pictures & the Filter: to *.png ?

Re: Please help: Regular expressions

Posted: Mon Feb 22, 2016 10:11 pm
by 00
Bump... Can someone please confirm that regular expressions work and tell me what I'm doing wrong?

Re:
Can't answer on the regex end, but why are you even needing regex in this case?

Why not set the Location: to L:\Pictures & the Filter: to *.png ?
The location is set to multiple paths and I don't want to have to throw away the time it required to do that search and take more time doing multiple sub-searches. Seems to me that RegEx would take the minimum time to filter already performed searches without having to search again.

Re: Please help: Regular expressions

Posted: Tue Feb 23, 2016 3:05 pm
by DigitalVolcano
^L:\\Pictures\\.*\\*.png$
This won't work as the filename (*.png) part is in a different column - it will only match on the selected column (path) unfortunately.


The best way to do this with the current version is-
Selection Assistant ->Work only on currently selected rows = checkmarked
Sort by folder name and select (highlight row) all folders below L:\Pictures
Selected Assistant->Select by text pattern, column='File name' pattern = .png (non-regex) or png$ (regex)

Re: Please help: Regular expressions

Posted: Thu Feb 25, 2016 5:58 pm
by 00
^L:\\Pictures\\.*\\*.png$
This won't work as the filename (*.png) part is in a different column - it will only match on the selected column (path) unfortunately.
Question: Why does the tool allow sorting by columns, all except by "File Type"? To me, this seems like a bug.
It would also be nice to first sort by file type and then by path, or the opposite.

Additionally, shouldn't the selection assistant -> select by text pattern -> column name = file name, accept wild cards? Why can't I search for *.png (or *.p*) given that the extension is part of the file name?

Thank you.

Re: Please help: Regular expressions

Posted: Wed Mar 02, 2016 11:13 am
by DigitalVolcano
If you want a wild card you'll need to use a regex.

e.g.

Code: Select all

\.png$
Alternately you can right-click on the file type you require and select Mark->All files of this type.