From b07cd88d109b313832b605c7d39f38ec608e9882 Mon Sep 17 00:00:00 2001 From: "Mr.k" Date: Mon, 19 Aug 2024 21:31:22 +0300 Subject: [PATCH] Fix RegEx in 'Invoke-Preprocessing' Script Tool --- tools/Invoke-Preprocessing.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Invoke-Preprocessing.ps1 b/tools/Invoke-Preprocessing.ps1 index 092799d2..85458480 100644 --- a/tools/Invoke-Preprocessing.ps1 +++ b/tools/Invoke-Preprocessing.ps1 @@ -164,7 +164,7 @@ -replace ('\}\s*Catch', '} catch') ` -replace ('\}\s*Catch\s*(?(\[.*?\]\s*(\,)?\s*)+)\s*\{', '} catch ${exceptions} {') ` -replace ('\}\s*Catch\s*(?\[.*?\])\s*\{', '} catch ${exceptions} {') ` - -replace ('(?\[.*?\])\s*(?\$.*?(,|\s*\)))', '${parameter_type}${str_after_type}') ` + -replace ('(?\[[^$]+\])\s*(?\$.*?)', '${parameter_type}${str_after_type}') ` | Set-Content "$fullFileName" Write-Progress -Activity $ProgressActivity -Status "$ProgressStatusMessage - Finished $i out of $numOfFiles" -PercentComplete (($i/$numOfFiles)*100)