PowerShell can call the exact same method:
[Regex]::Escape($regexStr)
But you could even improve your replacement by using just a single regex replace:
$regexStr -replace '[[+*?()\.]','$&'
However, I probably still missed a few metacharacters from that character class, so just use the [regex]::Escape
method.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…