You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The content of a quoted string is being parsed when it shouldn't be. #4870
Cannot find drive. A drive with the name '[^' does not exist.
At line:1 char:1
+ "OK" | grep -E '[^:]+'
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: ([^:String) [], DriveNotFoundException
+ FullyQualifiedErrorId : DriveNotFound
On Windows (with grep) outputs the expected OK.
Comment
Compare with
"OK"|Tee-Object"[^:]"
on windows which returns the identical error message.
"OK"|Select-String-pattern "[^:]"
works correctly on both platforms.
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.0.0-beta
PSEdition Core
GitCommitId v6.0.0-beta.7
OS Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 1517:36:27 PDT 2017; root:xnu-37...
Platform Unix
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Activity
markekraus commentedon Sep 20, 2017
It appears to happen with any string that fits the pattern
I can repro this on
Other examples:
These all produce the same results.
These all work fine though:
and
Prints
BrucePay commentedon Sep 20, 2017
This is caused by #3931 which should be fixed in the next beta.