Trimming an extended information field

I've noticed when pulling album catalogue numbers from discogs, and displaying them in a custom field, sometimes they have more than one.

e;g: TICK001CD, TICK001CD, TICK001CD, TICK001CD

How can I create a reg expression to grab that first catalogue number where commas separate multiples?

Currently, my custom field is as follows:

Name: CATALOGNUMBER
Value: $upper(%catalognumber%)
Field: %catalognumber%

You want to reduce multiple appearances of the same content in CATALOGNUMBER to one entry?

Or do you want the first entry only, ignoring what other contents follow?

In that pictured example, they are all the same, but in others, they may be different - all I want is the first listed.

You could adapt

and use

$regexp(%CATALOGNUMBER%,'^(.+?),.*',$1)

BTW:
The term "trimming" as used in your title question is not exactly what you want to do.

"Trimming" in the scripting world means "to cut away leading or trailing whitespaces":

Apologies for using the wrong term. I'm very much a novice at this.