s = "aaaaaaaaa[hoge]piyopiyo"
r = "[hoge]piyo"

if s =~ /#{r}piyo/
 puts $&
end

今日こんな感じのコード書いてマッチしねえってことで
しばらくはまってた