Split variable based on another longer variable

I have a variable in Grafana which is a multi value.
The databricks query return for example:
Bucket1(new)
Bucket2(old)

Bucket24(old)

I need another hidden variable multi valued which will hold the selected values of the above but will take the split part 0 so I will get:
Bucket1
Bucket2

Can you help please?