Skip to content

Fixes #12186 - Fix quotes in example #12187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2025

Conversation

sdwheeler
Copy link
Collaborator

@sdwheeler sdwheeler commented Jun 29, 2025

PR Summary

Fix quotes in example

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributor's guide.
  • Style: This PR adheres to the style guide.

@sdwheeler sdwheeler requested a review from Copilot June 29, 2025 00:07
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Contributor

Learn Build status updates of commit ef6be17:

✅ Validation status: passed

File Status Preview URL Details
reference/5.1/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md ✅Succeeded View (powershell-5.1)
reference/7.4/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md ✅Succeeded View (powershell-7.4)
reference/7.5/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md ✅Succeeded View (powershell-7.5)
reference/7.6/Microsoft.PowerShell.Core/About/about_Comparison_Operators.md ✅Succeeded View (powershell-7.6)

For more details, please refer to the build report.

@sdwheeler sdwheeler merged commit 041eb70 into MicrosoftDocs:main Jun 29, 2025
6 checks passed
@sdwheeler sdwheeler deleted the sdw-w445188-i12186 branch June 29, 2025 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example not using double quotation marks as described to demo subexpression
1 participant