You can use #{} just like in a string.
1.9.2p290 :001 > some_string = "033112"
=> "033112"
1.9.2p290 :002 > a_regex = /[A-Z]{1,4}#{some_string}[A-Z]{1-5}-EQB.html/
=> /[A-Z]{1,4}033112[A-Z]{1-5}-EQB.html/
You can use #{} just like in a string.
1.9.2p290 :001 > some_string = "033112"
=> "033112"
1.9.2p290 :002 > a_regex = /[A-Z]{1,4}#{some_string}[A-Z]{1-5}-EQB.html/
=> /[A-Z]{1,4}033112[A-Z]{1-5}-EQB.html/