Hello all, I'm very new to the program, and wanted to see if someone can explain Regular Expressions a bit. I just don't know where to start, I'm not asking for a class, but just a little clarity.
This is what I'm trying to do.. I have a file that is named,
AZ - Problems (Radio).mp3
Now what I'd like to do with this file is Change (Radio) to (Clean) and then set the Genre as HipHop Clean. Pulling Clean from (Clean).
So say if the file was AZ - Problems (Dirty), I'd want to have the Genre set to HipHop Dirty and so on.
I think If I have an example, I could half way figure it out how to start doing some of this.
Are you sure, that you want a pure 'regular expression solution'?
Did you ever have tried the standard scripting functions, converter and actions to solve the task?
Another Question. Is there a way to scan in the title for say (Clean), (Dirty), so on. I guess this is where the Regex would come in handy. Thanks in advance.
What I'm trying to do is Take what's in the title, and append it to the Genre. For instance, from my record pools, I get a file; 50 Cent - Major Distribution (Clean).mp3. The way i've been doing it, is a two - three part process. But I'd like to get it into an action, to take that (Clean) and append it to the Gere HipHop so the genre would be Hiphop Clean or HipHop Dirty, based on the title. As well, (Instrumental) and so forth. If I get an idea of how it's done, this would save a ton of time.
Because you got already examples to solve the task, we are now at a point to clarify what tag-fields are really in usage ...
real tag-field GENRE="HipHop" ... already set.
real tag-field TITLE="" ... what content?
pseudo tag-field _FILENAME="50 Cent - Major Distribution (Clean)"
... does tag-field TITLE contain the same value as the filename or does TITLE not exist?
... should tag-field TITLE be set with a new value? ... what value?
... existing tag-field GENRE should be changed by adding the genre specifier, which has to be extracted from the round bracket clamb at the right edge from the filename (resp. from the tag-field TITLE ?), to set the value e. g. from GENRE="HipHop" to GENRE="HipHop Clean"?
Please report where do you get stuck.
If you want to see how a regular expression can help ...
... this regular expression extracts the content from the round bracket clamb at the right edge of the filename ('genre specifier') out of the filename ...
$regexp(%_filename%,'^.+?\s\((.+?)\)$','$1')
From:
50 Cent - Major Distribution (Clean)
To:
Clean
Other example ...
Converter: "Tag - Tag" ... or ... Action: "Format value"
Field: GENRE
Format string: %GENRE%''$mid(%TITLE%,$add($strrchr(%TITLE%,'('),1),$sub($sub($strrchr(%TITLE%,')'),$strrchr(%TITLE%,'(')),1))
From:
TITLE=50 Cent - Major Distribution (Clean)
GENRE=HipHop
To:
TITLE=50 Cent - Major Distribution (Clean)
GENRE=HipHop Clean
I'm looking at the File name.. The Genre, Artist and Title Tags would already be set. Title tag matches filename after the Artist followed by the - . Thanks for all your help.. I will look at this and try to get it to work.. You've given something to work with.