Bulk deleting content from the end of a variable field

Hi all
The item records for our archive collection include a 949|a shelfmark with a box number suffix:

e.g. PP/JCM.10/1:Box 3

We need to remove the box number (including “:”) from the end of all these shelfmarks so that it ends up like this:

PP/JCM.10/1

Is there a way that we can do a bulk edit to delete all content from, and including, a specific point in a variable field? i.e. in this case, the colon and any content after it? I’ve had play around, but can’t see a way.

If not, any other way we could tackle this?

Thanks
Louise

I’m not skilled at fancy Global Update editing, @Louise_Simon, but as to your question regarding alternative methods, it is doable by using Python to make API calls.  If no one replies with a Global Update solution and you want to explore the Python/API approach, post here.  Personally, I hope there is a GU solution because I would like to learn how to structure that update.

1 Like

Unfortunately, I don’t think Global Update has any wildcard or regular expression functionality allows for matching or replacing parts of a string. If there are too many records to change manually, you might be able to export them to MARCEdit, make the bulk change there, and import the records back into Sierra.

For example, I just tested this RegEx find/replace in MARCEdit, and it appears to do what you described:

Find: (=949)(.*)(:Box)(.*)
Replace: $1$2

1 Like

Thanks, Alex. I’m taking a closer look at this.