Fixes #12186 - Fix quotes in example#12187
Merged
sdwheeler merged 1 commit intoMicrosoftDocs:mainfrom Jun 29, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR corrects the quotes used in the regex replacement examples in the About_Comparison_Operators documentation for multiple PowerShell versions.
- Updated the example code to use double quotes for the input string and replacement pattern
- Applied the same fix consistently in files for PowerShell versions 7.6, 7.5, 7.4, and 5.1
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| reference/7.6/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md | Fixed quotes in example code |
| reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md | Fixed quotes in example code |
| reference/7.4/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md | Fixed quotes in example code |
| reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md | Fixed quotes in example code |
Comments suppressed due to low confidence (4)
reference/7.6/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md:615
- The updated example now uses double quotes for both the input string and the replacement pattern. Please confirm that this syntax change correctly reflects the intended behavior without unwanted variable interpolation.
'Hello World' -replace '(\w+) \w+', "$1 Universe"
reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md:615
- The replacement of single quotes with double quotes in the example has been applied here as well. Verify that the behavior remains consistent with documentation expectations.
'Hello World' -replace '(\w+) \w+', "$1 Universe"
reference/7.4/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md:615
- The update to use double quotes is also applied in this file; ensure that the regex replacement example clearly demonstrates the intended behavior.
'Hello World' -replace '(\w+) \w+', "$1 Universe"
reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md:592
- The change to double quotes for both the string and replacement pattern has been made in this file as well—please verify that this reflects the correct example behavior as intended.
'Hello World' -replace '(\w+) \w+', "$1 Universe"
Contributor
|
Learn Build status updates of commit ef6be17: ✅ Validation status: passed
For more details, please refer to the build report. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Fix quotes in example
PR Checklist