單引號(hào)怎么替換啊? String str; str=str.replaceAll("\'","\\\'"); 這樣寫出錯(cuò)!

熱心網(wǎng)友

對(duì)" ' "的處理不需要經(jīng)過 轉(zhuǎn)義的! str.replaceAll("'","ddd") str.replaceAll("ddd","'")

熱心網(wǎng)友

shift+;