I need to batch-replace all PHP calls in HTML files with simple HTML. Maybe regular expressions are the way to go?
Background… I’ve been tasked with dumbing down our Mambo & Gallery2 -generated website into vanilla HTML, as a temporary measure to stop the crazy CPU load being generated by one or more CGI’s on the site. Our web designer is unavailable, and frankly I don’t want the guy touching the site ever again.
Anyhow, I used a spider to convert the PHP calls into HTML pages, so the code I need to replace is something like this:
Replace this:
<param name=“filename” value=“gallery2/main****.html?g2_view=core.DownloadItem&g2_itemId=928&g2_serialNumber=3&g2_GALLERYSID=9953fe8cc7591acadb87b39d2ac13d81”>’);
With this:
<param name=“filename” value=“gallery2/main****.wmv”>’);
Where **** is a different series of alphanumeric characters per HTML file, so it needs to remain the same, but I want to change html to wmv (or other ext), and I need to strip everything else up to the end quote.
I tried using the regex code in a batch-replace script for HTML-Kit, an html editor, but I can’t figure it out, I keep getting “expected this” errors.