July 19, 201214 yr I have over 3 thousand pages with the following script on the page: <script type="text/javascript"> var dhtmlwin = null; function openThumbnailLink(addr, winWidth, winHeight) { dhtmlwin = dhtmlmodal.open('ETGfullsizeimagewindow', 'iframe', addr, 'Dianna Agron Photos', 'width=' + winWidth + 'px,height=' + winHeight + 'px,center=1,resize=1,scrolling=1'); dhtmlwin.onclose=function () { dhtmlwin = null; return true; }; } </script> I just want to find this script on every page and replace it with a new script. Everything is exactly the same in the script on every page except for: 'Dianna Agron Photos' which has a different name on every page. Edited July 19, 201214 yr by riospace
July 19, 201214 yr Author I have over 3 thousand pages with the following script on the page: <script type="text/javascript"> var dhtmlwin = null; function openThumbnailLink(addr, winWidth, winHeight) { dhtmlwin = dhtmlmodal.open('ETGfullsizeimagewindow', 'iframe', addr, 'Dianna Agron Photos', 'width=' + winWidth + 'px,height=' + winHeight + 'px,center=1,resize=1,scrolling=1'); dhtmlwin.onclose=function () { dhtmlwin = null; return true; }; } </script> I just want to find this script on every page and replace it with a new script. Everything is exactly the same in the script on every page except for: 'Dianna Agron Photos' which has a different name on every page. I am using Dreamweaver
July 19, 201214 yr Author Got this answer and it worked great: '([^']+)' which should be all that's necessary. Unless-- shudder!-- those variably-named pieces sometimes contain a literal apostrophe. Then you have to go to a slightly more complicated rule involving \\ for the literal backslash where you escaped the literal apostrophe. (Read that sentence slowly ) :: thinking :: {blahblah} 'John\'s Pictures' {blahblah} '([^']+(\\'[^']+)*)'
Create an account or sign in to comment