So I am tasked with looking through all of the html content areas in my content tree and look for this string:
"<div id="fpCE_version" style="display:none;">8.5.1</div>"
However the version changes with numbers so this 8.5.1 could be 8.5.7 or 8.4.2, so I need a way of looking for that div and replace it with nothing. Here is what I have for only finding the one version so need help with either regex or any other ideas. Thanks
foreach ($item in $itemsToProcess) {
$items = Get-ItemField $item
foreach($field in $items){
$html = $item.Text
if([String]::IsNullOrEmpty($html)) { continue }
$newText = $html.Replace('<div id="fpCE_version" style="display:none;">8.5.7</div>', '')
$item.Text = $newText
}
}