If a pattern exists in a string, then take a certain action on another string

Hello all, good day. Thanks for all your help thus far. I have yet another question.

If in a string say %album%, a string 'Vol 7' exists, I want to replace the track with 7%track%, else no action.

How can this conditional formatting be done?

Truly appreciate your help.

Thanks.

You could try an action of the type "Format value" for TRACK
Format string: $regexp(%album%,.*Vol (\d+),$1)%track%

Hello. Thanks. And what if my logic is
If
Vol number exists,
thenVol = Discnumber,
else discnumber =1

Appreciate your help.

A little hard to tell as you supply so little information around it. But it could go along something like`"Format value" for DISCNUMBER

Format string: $if2($regexp(%album%,.*Vol (\d+),$1),1)