Correct MCFadden to McFadden etc

Hi guys , can you help me with writing an action ?

After using the "Case Conversion" on all fields , i'm left with a bunch of random Artists & Album Artists that now read > Brian MCFadden , Norris MCWhirter etc :unsure: -

But i want it to read Brian McFadden or Norris McWhirter

I'm guessing that i need to do a 'replace with regular expression' on the %artist% and %album Artist% fields , but i don't know what code to use for the rest ?

can you help ?

many thanks


I think that this is more or less a case for an ordinary "Replace" not a complicated "Replace with regular expression" as you want to replace one string constant with another (and not a pattern):
Search string: _MC
Replace string: _Mc
Tick case-sensitive - and use a blank instead of the underscore I used to clarify where it is needed.
I am not sure what you mean by "the rest" - the action is the same for any field where you find that kind of data.

Wow that was a quick reply ! Thanks Ohrenkino , your suggestion worked great , and did exactly what i needed .

the only problem is that it also changed artists like The Boomfunk MC's and Young MC to The Boomfunk Mc's and Young Mc - is there any way i can avoid this ?


Probably not. These are those special cases of the illogical everyday language ... BUT: if you know that these are the only exceptions, you could add another replace action that replaces Mc's with MC's.

And the "MC" problem: I think that this is also a case for some post-treatment when the majority of cases has been dealt with.
Add an action of the type "Replace with regular expression"
Search string: Mc$
Replace string: MC
This looks for the string Mc at the end of a field and replaces it. If the MC is not the last word in a field, you can use a simple replace again
Search string: Mc
Replace string: MC
The underscore represents a space character, use that instead, the underscore was only used for clarification purposes.

Thanks Ohrenkino - I really appreciate you taking the time to reply


In cases like this, where not all the changes are needed, you can do this:

1] search [filter] for "MC"
2] look at the pre-selected files
3] remove unwanted cases [that are not to be changed]
4] run the automatic replacement process
and then
5] repeat the the search process
6] repeat the manual and automatic process
and the
7] check out all changed files

So basically, you should not run the automatic process on all of the files; because executing it on a pre-selected file gives less room for a mistake

Depending on how many files you have, this can take a long time. But only in this way you will be certain, that you are not making unnecessary changes