13
You can also write...
regex = Regexp.compile(string)
...which is a very descriptive name. This method compiles the source code (string) into a nondeterministic finite automaton (regex). The NFA can then be reused over and over.
you can try /#{your variable}/