"a. ○できる  txt.replace( /hoge(.*)huga/, "huga$1hoge"); b. できない  txt.replace( /hoge(.*)huga/, "huga" $1 "hoge"); c. できない  txt.replace( /hoge(.*)huga/, "huga" RegExp.$1 "hoge");"
ひろ式めもちょう: JavaScriptのreplaceで正規表現による後方参照