I have the following regex:
(.+)([) ._-]+[a-z])()(.[^.]+)$
I want it to match a filename that ends (before the extension) with one of )
.
_
-
followed by a letter.
Using this example (using case insensitive matching)
The.Chronicles-A.mp4
Matches with
Group 1 The.Chronicles
Group 2 -A
which is what I want.
But if I have (where the single character before the letter is )
)
The.Chronicles.(2001)A.mp4
I get
Group 1 The.Chronicles.(2001
Group 2 )A
Is there any way to modify the regex so in the second example group 1 is The.Chronicles.(2001)
– with the )
that matches in the second group included in the first?? (but any other of the possible letters don’t appear in the first group. I don’t care whether they are in the second group or not)
Thanks
Andy