Welcome Guest

Pages: 1
remove the opus number from the field Title
ThijsAPostAugust 2, 2025, 09:21
Newbie
Posts: 19
Registered:
August 9, 2022, 11:32
Normal topicremove the opus number from the field Title

I would like to create an action that removes the abbreviation "op." plus the following number from the field Title. The number can be 1 to 4 digits long and is incidentally followed by a letter (hence op.1, op.12a, op.123, op.1234 etcetera).

For example:
change
"Shostakovich | String quartet no.8, op.110 ('Dresden') - I. Largo–"
to
"Shostakovich | String quartet no.8 ('Dresden') - I. Largo–"

2MR2PostAugust 2, 2025, 11:37
Avatar photo
Administrator
Posts: 2362
Registered:
August 23, 2012, 19:27
Normal topicremove the opus number from the field Title

Download https://2manyrobots.com/actions/Remove-Opus-from-Title.zip

The action can be called from the Multi Field Editor's actions panel (only works on Title); from the Title field's function button; or directly as you would run any action.

It also handles opus and op as well as op. It's case insensitive. It ignores a sequence at the start of the field. This is intentional as I doubt that it is valid.

The letter after the number is ignored if there is more than one alpha. ie. Opus 123a will work while op. 3ax will only remove op. 3.

The action always removes leading and trailing spaces and converts sequences of multiple spaces to a single space. (The removal can result in contiguous spaces).

If you want to test with sample data open the action in the action manager. Select line 4 and click on the preview (eyeball) button in the panel at the lower right. The Regular Expression Tester will open with the same expression and replacement template (which is a single space). Place test data in the source box at the lower left and hit the Test button. Make sure you close the panel via the Discard button or any inadvertent changes will be saved back to the action. If you forget you'll get prompted to save the changes when you close the action at which point you can decline.

ThijsAPostAugust 3, 2025, 10:47
Newbie
Posts: 19
Registered:
August 9, 2022, 11:32
Normal topicremove the opus number from the field Title

Thank you very much! I am going to use right away

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