How to Use Variables in Regular Expression Searches?

Yep. Pretty much just like you stated.
One thing to keep in mind is to account for the KM Variable containing any RegEx meta characters.
There is a procedure to "escape" these meta characters.
See