I just needed to implement this in my code: thank you @mklement0 -
Also, to avoid false positives, use ... -replace ('\b' + [regex]::Escape($oldString) + '\b'), $replacements[$oldString]
It all works now. Thanks!