Complete removal of the first string

I have such action

Replace expression "TITLE": "^\d*\s*\w* -> ""

Its purpose is to remove the very first string from the TITLE tag

However it ignores characters like ''('' or ''=''; probably because of what I red at


All characters except . | * ? + ( ) { } [ ] ^ $ .
These characters are literals when preceded by a "\".

I do not know what literals are but I tried adding e.g. this

Replace expression "TITLE": "^\(* -> ""

And it worked- I can now remove round opening bracket. So what is the problem?

A] I would have to multiply the regular expression for all of the listed above special characters, right?

B] If the first string happens to be enclosed in brackets [like (SomethingThatNeedsToGo) for example], then executing that action will only remove the very first character [the ( sign], leaving me will the necessity to execute that action 2 more times

So my question is- is there some expression that says

Remove first string, whatever it is, until the first pause - and then also all the white spaces before the second string [because that second becomes then the first string and so no pause is needed in front of it]


No, I don't think so. The restrictions apply to the regular expression but not to the evaluated string. So if you literally use any of the mentioned characters in the regular expression, then you have to take special care.

What I would find much more interesting: what do you mean by "first string"? How is that characterized? Examples would make it easier.

Had I used word instead of ``string`, would make it my question more more clear?

I need to get rid of anything and everything that is before the second word or a single character that constitutes as a second word. All must go, not only letters and digits. The code must stop with the last pause in the set of pauses when looking from the left

Example? An extended one:

The original file was named

Main Title (Demo)

During audio editing I change it temporarily to

Main Title (Demo) = The Rock Theme (Demo)

so that I would know what is what. But when I am done I need to be names as

The Rock Theme (Demo)

So I need and action that will execute on such file 4 times and not 6 or even more [because of the spaces]

In 90% cases I will apply such action only 1 time- the example above is somewhat extreme. Also: yes I could do that manually- but if I have ten version of that file like "Main Title (Demo) = The Rock Theme (Demo) A", "Main Title (Demo) = The Rock Theme (Demo) B" etc. then a need arises for automation of the process

[On a side note. I wanted to write "Main_Title_(Demo)___ =_The_Rock_Theme_(Demo)" where every "_" represents a pause, but this forum ignores every excess of them. How on this forum can we write more than one pause?]

So, if the pattern is always "space character space" then you could use an action of the type "Guess value"
Source string: $regexp(%title%,' . ',__)
Target string: %dummy%__%title%

No, its "character(s) space(s) character(s)"

I do not know how, but this guesses exactly, as with only 1 click [execution] the

Main Title (Demo) = The Rock Theme (Demo)


The Rock Theme (Demo)

But that is not what I was after, as with merely 1 click it should change to merely

Title (Demo) = The Rock Theme (Demo)

To remove the first word try an action of the type "Replace with regular expression", probably for TITLE
Search string: ^\w
Replace string:
(leave empty)

Unfortunately this Replace with regular expression code

Field: TITLE
Replace expression: ^\w
Replace matches with:

leaves the pause(s) after removed word. And what is more important [as the pauses I can remove in other ways], it is unable to process the bracket

Also altering it to ^\w* does not make a difference

There are no brackets in your example:

You know the short comings of the forum software: it does not display trailing space characters.
I am sure that you can add one after \w.

Here is something more to try:
$regexp('Main Title (Demo) = The Rock Theme (Demo2)','^.*? (.*)',$1)
which leads to
Title (Demo) = The Rock Theme (Demo2)

But if I am not mistaken, that would require to copy the FILENAME each time into the code, for each different file?

Use the field variable instead.

And by variable you mean TITLE?

If what I am suppose to use is this

Replace expression "TITLE": "$regexp('%TITLE%','^.*? (.*)',$1)"-> ""

or this

Replace expression "TITLE": "$regexp(%TITLE%,'^.*? (.*)',$1)"-> ""

then it does not work, as nothing changes

It the string is not in the title, then hard luck.
I thought you talked about the filename? The variable for the filename is %_filename%

My mistake

My TITLE is almost always the same as FILENAME. But yes, I should had written TITLE

Anyway thank you for the help. And if anyone in the future knows how to deal with this: then please post your ideas, as I will read them

Still works - so the contents of TITLE must be somehow different.
You can test your regular expression in Convert>Tag-Tag

In there this ```$regexp(%TITLE%,'^.? (.)',$1)`` works

So I copied it from there to Action, to avoid mistakes- and there this very same code does not work

This reminds me of this "Filename - Tag" ICON, where depending on the way the data is going I either use Action [for FILENAME > TITLE] or the Tag - Filename icon [for TITLE > FILENAME]

All in all I use now

Regular expression "TITLE"; ^\d*\s*\w* -> ""

and as a fail safe I compare what I see in TITLE in the Tag Panel with the FILENAME in see in the Main Window. It works- until it stops at charters like ( and =

I could work around that by proceeding the aforementioned code with

Replace "TITLE": "(" -> "XXXX"
Replace "TITLE": "=" -> "XXXX"

but this would also transform all these characters that would be present anywhere else in a TITLE and not only at its beginning