repeated parts in titles of folders

General discussion related to "Everything".
Post Reply
adamantine
Posts: 214
Joined: Mon Jan 09, 2012 10:56 am

repeated parts in titles of folders

Post by adamantine »

it is necessary to find folders/files that have 2 (or more) equal fragments in their titles

for example, the 6-symbol fragment "(With " is present twice in title of this folder: "1987 - Album (With Artist1) (With Artist2)"

we know that "a{2,}" represents the letter "a" repeated at least twice. i tried "(With "{2,} but it does not work
how to match the preceding symbols (not just 1 symbol) 2 or more times?
therube
Posts: 4561
Joined: Thu Sep 03, 2009 6:48 pm

Re: repeated parts in titles of folders

Post by therube »

Not exactly what you want, & a paren, (, breaks things too, (& I don't even know what this does, particularly ;-)), but a start:

Regex:

> with[^a]*with

Finds:

> U2 - With or Without You.mp3

---

Edit, Regex:

> \(with .*\(with

(that's with a trailing space after each 'h', so 'h ')

Finds:

> U2 - (With Or (With out You).mp3

But not:

> U2 - (With or (Without You).mp3

---

> (With "{2,}

Seeming it would/should be:

> (With ){2}
(closing paren was missing)

But that still doesn't work.

---

Edit, much faster, but does not take the tailing space into consideration:

> regex:(\(with.*\(with)

(Regex is not enabled, but specified directly.)
adamantine
Posts: 214
Joined: Mon Jan 09, 2012 10:56 am

Re: repeated parts in titles of folders

Post by adamantine »

therube
thank you. it seems that these 2 methods work:

regex disabled:
regex:(\(with.*\(with)

regex enabled:
\(with .*\(with
Post Reply