Reg expression for all except path containing "iconic"

The best solution for finding and removing duplicate files.
Post Reply
User avatar
Brian

Reg expression for all except path containing "iconic"

Post by Brian »

Hello,

I need to select files in two steps: 1) using Select by Location, preserve the files in a certain folder and all subfolders. This works fine. 2) Then to further refine, I need to unselect those that do NOT have the word iconic in their path. I chose Select by text pattern, change the Column Name to Path, select the 'Use Regular Expressions' checkbox, put (?!iconic) as the Pattern to match and click Unmark. The result is that all selections are removed. What am I doing wrong?

Thanks,
Brian
User avatar
DV
Posts: 78
Joined: Fri Jun 10, 2011 9:00 am

Re: Reg expression for all except path containing "iconic"

Post by DV »

That regex selects everything - I think just "iconic" then unmark should work to unmark everything that contains that phrase.
User avatar
Brian

Re: Reg expression for all except path containing "iconic"

Post by Brian »

I need the opposite, unmark those that do NOT contain the phrase.
User avatar
DV
Posts: 78
Joined: Fri Jun 10, 2011 9:00 am

Re: Reg expression for all except path containing "iconic"

Post by DV »

How about:

Code: Select all

^(?!.*iconic)
User avatar
Brian

Re: Reg expression for all except path containing "iconic"

Post by Brian »

That worked! Thanks DV.
User avatar
Brian

Re: Reg expression for all except path containing "iconic"

Post by Brian »

DV, sorry to trouble you again but could you give the expression that would unmark those that do NOT contain the word iconic EXCEPT for those that contain the word cfa (meaning leave their marked state alone).
User avatar
DV
Posts: 78
Joined: Fri Jun 10, 2011 9:00 am

Re: Reg expression for all except path containing "iconic"

Post by DV »

That's a tricky one- haven't worked it out yet!
Post Reply