Welcome Guest

Pages: 1
In need of a fancy "find & replace" expression
SnowdogPostMarch 23, 2022, 08:53
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicIn need of a fancy "find & replace" expression

Some brainiac has decided to number all the songs in this disc from Mozart's Magic Flute (see attached image). Not an entirely unreasonable thing to do, but not something I need in my tagging.

Is there a way to find & replace something like this, effectively with nothing?

As the numbers are all different, I assume some kind of "wild card" type expression might be needed.

I shall go ahead & do it manually, as there aren't very many. I was just curious as to how I might make my life a little easier in future.

Thanks.
Image

2MR2PostMarch 23, 2022, 11:18
Avatar photo
Administrator
Posts: 2085
Registered:
August 23, 2012, 19:27
Normal topicIn need of a fancy

I assume that the image is displaying the Title field. One offs like this are best handled in the Multi Field Editor. You can open it directly and select Title or simply right click on the function button to the left of the Title field and select Multi Field Editor.

You easiest way to do is is probably with the Replace function and a regular expression. I've attached a screenshot. By the way I am totally incapable of remembering regular expression escape sequences. If you hit the preview button (eyeball), the Regular Expression Tester will open where you can test and save the sequence ... and insert the escape sequences from a context menu.

If you're talking about the filename you could simply use a Rename template to rename it to the Title field. If you wanted to keep exactly the same filename without the leading #, it could be done in an action such as:

Get Property File Name (without extension) -> Variable 0
Find first match for regular expression "^#(\d)+\.( )*" in field Variable 0, replace with "" to field Variable 0
Rename Files (Variable 0) silent

Where the Variable 0 rename template is:

❨Variable 0❩
❨IfDup❩
    ·(❨Dup #❩)

Image

SnowdogPostMarch 23, 2022, 11:45
Pro
Posts: 279
Registered:
March 15, 2022, 17:12
Normal topicIn need of a fancy "find & replace" expression

Thanks. I think I may have to invest more time in learning some of this stuff that's new to me, but yes, it was the title field.

Pages: 1
Mingle Forum by Cartpauj | Version: 1.1.0beta | Page loaded in: 0.013 seconds.