Skip to content

Commit 3cf1933

Browse files
authored
Merge pull request #11816 from MicrosoftDocs/main
2/19/2025 PM Publish
2 parents 342e325 + 6993a2b commit 3cf1933

File tree

15 files changed

+794
-620
lines changed

15 files changed

+794
-620
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Break.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ specific condition:
132132

133133
```powershell
134134
$var = "word2"
135-
switch -regex ($var) {
135+
switch -Regex ($var) {
136136
"word2" {
137137
Write-Host "Exact" $_
138138
break

reference/5.1/Microsoft.PowerShell.Core/About/about_Language_Keywords.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ condition obtains, the action is performed.
474474
Syntax 1:
475475

476476
```Syntax
477-
switch [-regex|-wildcard|-exact][-casesensitive] ( <value> )
477+
switch [-Regex|-Wildcard|-Exact][-CaseSensitive] ( <value> )
478478
{
479479
<string>|<number>|<variable>|{ <expression> } {<statement list>}
480480
<string>|<number>|<variable>|{ <expression> } {<statement list>}
@@ -487,7 +487,7 @@ switch [-regex|-wildcard|-exact][-casesensitive] ( <value> )
487487
Syntax 2:
488488

489489
```Syntax
490-
switch [-regex|-wildcard|-exact][-casesensitive] -file <filename>
490+
switch [-Regex|-Wildcard|-Exact][-CaseSensitive] -File <filename>
491491
{
492492
<string>|<number>|<variable>|{ <expression> } {<statement list>}
493493
<string>|<number>|<variable>|{ <expression> } {<statement list>}

reference/5.1/Microsoft.PowerShell.Core/About/about_Regular_Expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ more about their syntax and usage at the links below.
3030
- [Select-String][11]
3131
- [-match and -replace operators][07]
3232
- [-split operator][09]
33-
- [switch statement with -regex option][10]
33+
- [switch statement with -Regex option][10]
3434

3535
PowerShell regular expressions are case-insensitive by default. Each method
3636
shown above has a different way to force case sensitivity.

0 commit comments

Comments
 (0)