question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected Select-String behavior

See original GitHub issue

Prerequisites

Steps to reproduce

With version 7.2.12 (LTS) this command

winget list | Select-String -Pattern 'Winrar' gives me highlighted result

WinRAR 6.22 (64-разрядная) RARLab.WinRAR 6.22.0 winget

while current version 7.3.5 gives me some strange symbols instead of highlighting.

WinRAR 6.22 (64-разрядная) RARLab.WinRAR 6.22.0 winget

I showed winget for example PS 7.3.5 does so with any external program. I used Select-String extensively while migrating from openssl 1.1.1 to 3.1.1 (openssl windows x64 slproweb). And had same behavior. It’s same PC and same PS profile.

Expected behavior

Highlighted result

Actual behavior

Strange symbols

Error details

No response

Environment data

PSVersion                      7.3.5
PSEdition                      Core
GitCommitId                    7.3.5
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

PS7 2 12 PS7 3 5

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lelik107commented, Jul 26, 2023
* [Selective disabling/re-enabling of VT support (ANSI escape sequences) is broken #19425](https://github.com/PowerShell/PowerShell/issues/19425)

You are right - this is the same thing just another example. It’s a bit strange that it doesn’t affect PS 7.2 LTS.

0reactions
lelik107commented, Jul 26, 2023

OK, i’m closing the issue as a dublicate of https://github.com/PowerShell/PowerShell/issues/19425

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected Behavior with ControlCommand SelectString
A call to ControlCommand to set "Base Moisture" results in "Base Moisture Actuator" being selected. In the ComboBox, "Base Moisture Actuator" is ...
Read more >
Unexpected select|regex behavior : r/PowerShell
Unexpected select|regex behavior. I've run into an issue when trying to use regex to select text. I have the following text in a...
Read more >
Unexpected result from PowerShell regex
The "case-insensitive" regex flag is set by Select-String , which makes \p{Lu} case-insensitive, just as it does with [A-Z] .
Read more >
[xsl] Unexpected behavior with xsl:choose, xsl:when, xsl:variable
I understand. Hide this message.
Read more >
Unexpected Case Sensitivity in PowerShell - Scripting Blog
The PowerShell RegEx native methods (eg -match, Select-String, etc) are case insensitive, case-sensitive methods do exist (ie -cmatch). This is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found