Skip to content

Commit

Permalink
fix: Generating .regex.txt files ( Fixes #235, Fixes #236 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage authored and James Brundage committed Sep 22, 2024
1 parent 59f4bb8 commit 7320188
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions RegEx/PowerShell/ParameterSet.regex.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Matches PowerShell ParameterSets (in [Parameter] and [CmdletBinding] attributes)
ParameterSetName # Find ParameterSetName
\s{0,} # Followed by optional whitespace
\= # Followed by an equals
\s{0,} # Followed by more optional whitespace
\@? # Followed by an optional @
(?>\"(?<ParameterSetName>[^\"]+) # A ParameterSetName in a Double-Quoted String
\"|\'(?<ParameterSetName>[^\']+) # A ParameterSetName in a String Quoted String
# Matches PowerShell ParameterSets (in [Parameter] and [CmdletBinding] attributes)
ParameterSetName # Find ParameterSetName
\s{0,} # Followed by optional whitespace
\= # Followed by an equals
\s{0,} # Followed by more optional whitespace
\@? # Followed by an optional @
(?>
\"(?<ParameterSetName>[^\"]+) # A ParameterSetName in a Double-Quoted String
\" |
\'(?<ParameterSetName>[^\']+) # A ParameterSetName in a String Quoted String
\')

0 comments on commit 7320188

Please sign in to comment.