I have an existing site in which I need to replace a lot of code across multiple files quickly. The code is similar, but not identical on all pages, but there are two pieces of code on every page I need: the title and the main body of content. I thought regex was the way to go, but am curious if there's software to handle it.
If not, my regexp currently reads:
My replacement would be something like:
If not, my regexp currently reads:
Code:
(?:.*?)<(title*)\b[^>]*>(.*?)</\1>(?:.*?)"body"\s*-->(.*?)<--InstanceEndEditable -->(?:.*)
My replacement would be something like:
Code:
<%
pageTitle = "$1"
%>
<!-- Body -->
$2