以下這段代碼截取自某一網(wǎng)頁(yè)源碼:
onClick="MM_openBrWindow('../photo/nlife/sfc/pages/O'Connors_jpg.htm','RD','width=456,height=368')"
onClick="MM_openBrWindow('../photo/nlife/sfc/pages/Trad'r Sam_jpg.htm','RD','width=456,height=368')"
onClick="MM_openBrWindow('../photo/nlife/sea/pages/Mondo's Beach Pub_jpg.htm','RD','width=456,height=368')"
onClick="MM_openBrWindow('../photo/nlife/tam/pages/Mirage (Moet's) _jpg.htm','RD','width=456,height=368')"
onClick="MM_openBrWindow('../photo/nlife/tem/pages/Macayo's - N Central_jpg.htm','RD','width=456,height=368')">
onClick="MM_openBrWindow('../photo/nlife/tem/pages/RT O'Sullivans_jpg.htm','RD','width=456,height=368')"
onClick="MM_openBrWindow('../photo/nlife/nyc/pages/Pat O'Hurley's Bar Grill_jpg.htm','RD','width=456,height=368')"
這里需要把鏈接中的'批量替換成'\,注意鏈接中有空格、特殊字符(橫杠、括號(hào)、等),有的地方'還出現(xiàn)不止一次。替換過程中還不能把其他地方的'和鏈接中的其他內(nèi)容替換掉,我想到用DW的正則替換,請(qǐng)問這樣的正則表達(dá)式要怎么寫呢?