Hi, I'm having trouble matching a large amount of text. I'm trying to match the following chunk of text and then replace it with one line of text.
<!-- BEGIN mainnav -->
<script
... many lines of HTML and text ...
table>
<!-- mainnav END -->
Should be replaced with:
<!-- mainnav REMOVED -->
How do I code the regular expression? So far I've tried a lot of different ways with this being the most recent unsuccessful attempt.
$fcontents = ereg_replace("<!-- BEGIN mainnav [[:alnum:]|[:punct:]|[:space:]|\n]* mainnav END -->$",
"<!-- mainnav REMOVED -->", $fcontents);
Thanks!
JCB