Is it possible to rename a variable using regex?


Let's say I have a variable:
g wth_t1_xxx = .


Is it possible to rename this variable using a regular expression so that it would be wth_xxx_t1? I'm looking for a pattern to capture the content between the underscores and move to the end, while taking the content at the end and move it to the middle.