I have been searching for answer for many days but I just can't solve it. In my case I need to replace string in .htm file. String is across multiple lines, for example:
</table>
<p>
<table border="1">
I tried the following but it isn't working and I know because the text appears over several lines.
Get-Content test1.htm )| ForEach{ $_ -replace '</table><p><table border="1">', "" } | Set-Content test2.htm
I have no idea how can I do it.
\n
`r`n