先生, 我是做用JavaScript。我的一個項目想與regex.in一個段落,以取代文本,我想使用JavaScriptJavascript和正則表達式替換文本
替換一些詞如:
var str =" Would you like to have responses to your questions |code Would you like to have responses to your questions code| Would you like to have responses to your questions "
var n=str.replace("to","2");
這裏所有的「到」將replaced.We不想之間刪除|代碼到代碼|請幫助我的任何一個.....