repeated parts in titles of folders

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

repeated parts in titles of folders

Post by adamantine » Wed May 28, 2014 3:08 pm

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: 2360
Joined: Thu Sep 03, 2009 6:48 pm

Re: repeated parts in titles of folders

Post by therube » Wed May 28, 2014 5:42 pm

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: 59
Joined: Mon Jan 09, 2012 10:56 am
Location: kiev

Re: repeated parts in titles of folders

Post by adamantine » Thu May 29, 2014 4:11 am

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

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

regex enabled:
\(with .*\(with

Post Reply