I search for a regular expression to extract a Powershell param block from a complete PowerShell script.
[CmdletBinding()]
Param(
     [Parameter(Mandatory=$True,Position=1)]
     [string]$computerName,
     [Parameter(Mandatory=$True)]
     [string]$filePath
    )
...
A colleague means that it is not possible to parse this structure by using a regualr expression. He said regular expressions can't count the opening and closing signs (...) inside the param block and that makes it impossible to parse the param block.
 
     
    