The following code is intercepted from a Web page source:
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 ' 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 ' Bar & grill_jpg.htm ', ' RD ', ' width=456,height=368 ')
Here you need to replace the ' batch ' in the link, note that there are spaces in the link, special characters (bars, brackets, &, etc.), and some places ' appear more than once. In the replacement process can not be other places ' and links in the other content, I think with the DW of the regular replacement, I would like to ask how to write the regular expression?
<textarea id= "txtsrc" rows= "cols=" "> 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 ' 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 ' Bar & grill_jpg.htm ', ' RD ', ' width=456,height=368 ') ' </textarea> < Input type= "text" id= "Txtreg" value= "(\w) \ ' (\w)"/> <input type= "text" id= "Txtto" value= "$1\ ' $"/> <input type= "button" onclick= "tXtdes.value = TxtSrc.value.replace (New RegExp (Txtreg.value, ' IG '), txtto.value); "value=" Replace "/> <textarea Id= "Txtdes" rows= "cols=" ></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]