2012-10-17 文字列の特定部分だけ置換(javascript) javascript matchを使う var test = "I can fly"; var afterReplace = test.replace.match(/can/).replace("can","can't");