Given a block of arbitrary text enclosed by specific tags, I would like to replace the whole chunk with something else (in the example, "BANANA")
$newvar = $oldvar -replace "<!-- URL -->(*.)<!-- END -->","BANANA"
Is there a mode in PS regex to not require escaping and can the syntax then be as simple as this to achieve the replacement?
UPDATE: I understand now that it should be .*, not *., but still no dice. The match covers multiple lines, if that adds complexity to the regex or requires other options.
(*.)and not(.*)