regex = /Hello (\d+) #{user}/g 2 / 3 2/3 a = b/c + d/g someOtherStuff name="hello" test=/// #{name} fancyRegExp = /// (\d+) # numbers (\w*) # letters $ # the end ///