Assistance required to locate a specific segment inside various text strings

Hello, everyone.

The following is an example of the string of text which I have to work on:


Actual working examples of album titles are:

Cara Mia (wChorus & Mantovani & His Orchestra)
Rock And Roll Waltz (wThe Hugo Winterhalter)

The string of text that needs editing, usually appears in the TITLE, ARTIST and the _FILENAME fields.

There are the three constants in the aforesaid strings:

  1. The opening bracket
  2. The closing bracket
  3. The letter "w" that immediately follows the opening bracket.

The letter "w" appears in lower case, although there are exceptions which are capitalised. There is no space inbetween the "w" and the leters immediately following, until the closing bracket. The text following the "w" can also vary considerably in length and form.

I am seeking your assistance, please, for a filter to apply to locate those files that match the opening bracket plus the lower case "w" (OR capital "W") in the %title%, %artist% and %_filename% fields. My own efforts at this came adrift using this, for example, for the %title% field:

%title% MATCHES \(w
%title% MATCHES \(w[w]

Once the relevant files are found, what would be the best way to restructure the applicable string to this —

From: (wfrank) to (With Frank)

That is, capitalise the W that follows the opening bracket, followed by a space, and then capitalise the first letter directly following this space.

I did make a Format Value action group for the three abovementioned fields that looks like this, and it is working, but I want to know if it holds any pitfalls which I should be aware of:

$replace(%title%,'(w','(With ',)

Thank you.

To filter for file with (w and a bracket followed by a lower case character followed by an upper case letter, try:
%title% MATCHES "\(\l\u" AND %title% HAS "(w"
or even
%title% MATCHES "\(.\u" AND %title% HAS "(w"

should be
$replace(%title%,'(w','(With ')


Thank you, am going to apply it shortly.

Question: is the last comma always superflous, and therefore should be dropped?

Where did you get the idea of a trailing comma?
The documentation says:
$replace(x,y,z) returns the string x with all occurrences of string y replaced by string z. Supports multiple parameter pairs y and z.

Taken from

Thanks for pointing that out. (I can't recall anymore why I am using it, since I have been using it for years just like that, and did not notice any ill effect due to it. At first, it did look out-of-place, but, sadly, I was none the wiser, because it did deliver the desired results.)

Sorry, I may have expressed myself poorly. The above currently filters the following, example:

Nancy (With The Laughing Face)

Instead of what is required. Here are more examples where the text segment marked in bold type, that needs to be filtered.

Nancy (wThe Laughing Face)
Nancy (WThe Laughing Face)
Nancy (wthe Laughing Face)
Nancy (Wthe Laughing Face)
Nancy (wfrank)
Nancy (WFrank)
Nancy (wFrank)
Nancy (Wfrank)

To be replaced with, example:

Nancy (With_The Laughing Face) — where the underscore represents a space.

Please try:
%title% MATCHES "(?-i)\(.\u" AND %title% HAS "(w"

It DID work just fine, thank you @ohrenkino.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.