13/01/09 15:57:43.87 Ci2Ffbyb0
>>894
どう混ぜたんた? できたわ
if (document.selection.Text == "")
document.selection.SelectAll();
var map = new Array();
map["hoge"]=[ "foo",""]; //正規表現を未使用
map[" +$"]= ["", "r"];// 正規表現を使用
var s1 = document.selection.Text;
for (var i in map) {
if(map[i][1] == "r")
s1 = s1.replace(new RegExp(i,"mg"),map[i][0]);
else
s1 = s1.split(i).join(map[i][0]);
}
document.selection.Text = s1;