Hello, @collingsjj, @peterjones, @alan-kilborn and All,
@collingsjj, if you don’t mind to study a simple plain text, just send me, by e-mail,
An example of your code containing the ESC sequences and similar codes. If possible, a text between 20 and 100 lines !
A snapshot of your corresponding code on your terminal
I’ll try to find out a regex search which could delete ALL these codes
For example, as a first approach, the following regex :
FIND (?-i)\x1b\[\d*(;\d+)?m
REPLACE Leave EMPTY
Would modify this INPUT text, taken from your GitHub issue #16437 :
[31;1m[0m[36;1m[36;1m[0m[36;1m[0m[36;1m[31;1m[31;1m[36;1m | [31;1mCannot find path 'E:\SharedData\jDownloader\cfg\downloadList4838991.zip' because it does not exist.[0m
[31;1mGet-ItemProperty: [0mP:\Backup\BackupScripts\ArchiveAttributeUpdate.ps1:3[0m
[31;1m[0m[36;1mLine |[0m
[31;1m[0m[36;1m[36;1m 3 | [0m . es -ea SilentlyContinue -value (([36;1mGet-ItemProperty $_.fullname[0m).Attrib .[0m
[31;1m[0m[36;1m[36;1m[0m[36;1m[0m[36;1m | [31;1m
Into this clean OUTPUT text :
| Cannot find path 'E:\SharedData\jDownloader\cfg\downloadList4838991.zip' because it does not exist.
Get-ItemProperty: P:\Backup\BackupScripts\ArchiveAttributeUpdate.ps1:3
Line |
3 | . es -ea SilentlyContinue -value ((Get-ItemProperty $_.fullname).Attrib .
|
My temporary e-mail address is :
tguy.038@gmail.com
Best Regards,
guy038