I'm using regsub to check if a variable matches a regular expression and if it does, regsub will replace the part that matches by what I want and assign that to a new variable
however, I wanted to make the opposite. I want regsub to assign the part of the variable that matched the regular expression to a variable. How can I do this?