Summary: Cloud & Datacenter Management MVP, Thomas Rayner, shows how escape characters for use in regex.
Is there a way to escape characters in a string automatically for use in regex?
Use the [regex]::escape()
method to automatically escape characters in a string so you can use them in regex.
[regex]::escape('something. in here (needs) escaping')
something\.\ in\ here\ \(needs\)\ escaping
0 comments