Created
October 26, 2020 09:47
-
-
Save pfmoore/01ee1578c2f7f03ab0ed8f01af346799 to your computer and use it in GitHub Desktop.
Strip ANSI escape characters from a string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ([String]$s) | |
$s -replace '\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])','' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment