I need some help from someone with regex skills!!! Ι have a bunch of videos with highlights from matches and I want to add some tags to them.
Let's say the initial filename is: [2023-02-23] TeamA 0-0 TeamB [Highlights] CHANNEL.mp4
1. I want to get the text "2023-02-23" between "[" and "]" characters and revers it. From "2023-02-23" to "23-02-2023". if this can be done.
2. I want to get the text "TeamA 0-0 TeamB" between "] " and " [" characters.
3. I want to get the text "TeamA 0-0 TeamB" between "] " and " [" characters and replace "0-0" to "VS".
Result example: "TeamA VS TeamB".
4. I want to get the text "CHANNEL" after "**] **" character.
If anyone could help me i would greatly appreciate it!!!
PS: If there is any tool (online or not) which can make regex use more simple, please inform me!!! I mean something that I wont have to put all these symbols etc.
I am no friend of fiddling only with the filename.
What does the tag data look like?
WOuldn't it be much easier to use the tag fields to rename the files?
And if the fields have not been filled, then that would be the first step.
E.g. it is much easier to modify
if it can be found in a single field and you don't have to carry around all the other bits of the string.
I am taking from filename because tags are empty and I just want to get parts from filename and add them to my tags accordingly!!! I just need the regex syntax... We are talking about hundreds of files.
As I said: it is much easier to manipulate the contents of single fields than to treat a longish string.
E.g. to get from TeamA 0-0 TeamB to TeamA VS TeamB could be achieved with a simple "Replace" and would not require a regular expression.
Okay, if I manage to get the text "TeamA 0-0 TeamB" from filename using regex and place it into Title tag (for example) then I can use Replace so to add the "TeamA 0-0 TeamB" as "TeamA VS TeamB" into Artist tag (for example). But as I can understand, I need regex for case 1, 2 and 4.
Under the condition that the regular expression has worked, how would you import the data form the filename? What would the mask look like?
If I knew what the regex mask would look like I wouldn't ask for help!!!
Yes... Can't we add regex into "Convert>Filename-Tag"?
This "[2023-02-23] TeamA 0-0 TeamB [Highlights] CHANNEL.mp4" is an example of how a real filename could be!!!
I want to add (reversed) 2023-02-23 text from filename into %releasetime% tag.
The text "TeamA 0-0 TeamB" from filename into %title% tag.
The "TeamA 0-0 TeamB" from %title% tag into %artist% tag as "TeamA VS TeamB".
And the text "CHANNEL" (channel name) from filename into %copyright% tag.
No.
That would be "Guess value" - and much more complicated.
To modify the sequence in RELEASETIME try an action of the type "Replace with regular expression for RELEASETIME
Search string: (\d\d\d\d)-(\d\d)-(\d\d)
Replace string: $3-$2-$1
To replace "0-0" in TITLE with VS try an action of the type "Replace" for TITLE
Search string: 0-0
Replace with: VS
I am really sorry if I am spending your time but to make your Action example work I first need to find a way to place 2023-02-23 into my %releasetime% tag etc. The same for your Replace example. They work, but if tags have something in them. As I said my tags are empty!!! Only thing I have is filename!!! So, how can I first add those parts from filename into my tags? Is there a way?
Try Convert>Filename-Tag
You are requested to add the named tag fields like we discussed before: [2023-02-23] TeamA 0-0 TeamB [Highlights] CHANNEL.mp4
Enter as mask: [%releasetime%] %title% [%subtitle%] %copyright%
(you have not said what should be done with [Highlights])
The preview in that function should show you the imminent result.
The function fills the tag fields for all selected files that match this pattern.