I'm trying to figure out how to capture a piece of the title tag that I create with my scripts. It denotes video resolution in the title and I want that to be captured by the file rename.
My files names should look like this:
VIDEO FILE--HD MOTION BACKGROUND (8) (1080P)--RESOLUTION(1080P).mp4
So for each file the title is appended and will have its own resolution value that could be anything from 1080P to 720P to etc. looking like this in the title field:
HD MOTION BACKGROUND (8) (1080P)
So my tag to file rename all works but the $regexp part shown below.
I want to capture the 1080P inside the parenthesis and dump it into the the file name since is a wildcard for all my MP4s.
What am I doing wrong? I don't use regexp much, so I assume it's a syntax problem, but I'm not getting a syntax error in the preview file name.
I've attached an image to show that I would expect to see the 720P inside the name, but since I'm using \d, it would only be the 720 without the P, but as you can see, there is nothing in the () at all.
I've tried both solutions, I've attached screenshots to show the result.
One result still has entire title and 720 included.
Other result also puts 1080 instead of the wildcard change.
As you can see, not all my files are 1080, so I'm trying to have it copy only the numbers minus the P and I can format the rest. I'm only trying to capture the digits.
There my be other () like (Clean) or (Dirty) that I don't want to capture if it was in the title also. I just want to capture the numbers.
Well part of it was I wasn't entirely sure since the first part was the fix part of the single file string. So my understanding was limited. Seeing the additional example you provided, it has become clear on how to do this and do it correctly.