Help with a regular expression action to replace & with 'and'

I need to create an action that will replace the "&" sign with "And" only when & is the first word in either the title or the artist.

I read the regular expression help but I can't say I understood much :slight_smile:

Could you give a real example of text in which you want to have it replaced an where you don't?
An action of the type "Format value" for ARTIST and
Format string: $regexp(%artist%,'^\&',And)
may work - but I hardly know any Artist that starts with &

Your fellow Germans "And One" is the perfect example.
I think I may have just figured it out.
Field: ALL
RegExp: ^&\s+
Replace with: And

Seems to have worked for me.
I may have found a small glitch. I created an action called Replace & with And. The action display shows "_" instead of the "&" under Actions. It displays correctly under Action Groups.

No glitch, a feature.
The & is used to markup keyboard shortcuts.
See the documentation on actions:

Thanks, I read it, can't say I understand. Coding is not my strong side, sorry.

I was referring to the section on how to create keyboard shortcuts with the ampersand.

16 posts were split to a new topic: Moving "feat." from title to artist

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