Regex __series.name in URL

I need to create a data link from a graphs ${__series.name}, but I need to regex the value. Namely the last 2 characters of it (…)$ and the 3 numbers from it \d\d\d. Is it possible to apply a regex in that URL generation?