Get two labels from one metric into variable

Hello! I want to put two labels into one variable, for example, I have _module=“m1” and _type=“t1”, so I want to get a variable=“m1 t1”. Is it possible? Maybe with a regex?