Page 1 of 1

repeated parts in titles of folders

Posted: Wed May 28, 2014 3:08 pm
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?

Re: repeated parts in titles of folders

Posted: Wed May 28, 2014 5:42 pm
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.)

Re: repeated parts in titles of folders

Posted: Thu May 29, 2014 4:11 am
by adamantine
therube
thank you. it seems that these 2 methods work:

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

regex enabled:
\(with .*\(with