-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-learnArea - LearnArea - Learnissue-doc-bugIssue - error in documentationIssue - error in documentation
Description
Prerequisites
- Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
- Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in
Get-Foo
cmdlet" instead of "Typo." - Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.
Links
Summary
The RE provided for the -match
example is strange:
'PowerShell' -match '^*.shell$'
^*
matches 0 or more of the "start of string" (of which there can only be one)
and then the .
in .shell$
matches any single character before the ending
substring "shell" ("r" in this case).
PS> 'PowerShell' -match '^*.shell$'
True
PS> $matches
Name Value
---- -----
0 rShell
Details
No response
Suggested Fix
I believe you intended to provide the following example instead:
PS> 'PowerShell' -match '^.*shell$'
True
PS> $matches
Name Value
---- -----
0 PowerShell
Metadata
Metadata
Assignees
Labels
area-learnArea - LearnArea - Learnissue-doc-bugIssue - error in documentationIssue - error in documentation