I am trying to match off of a string that would look like the following: %replaceme%pathfolder%match2%file.ps1
I want to be able to match anything that is within “%…%”. I was trying to match with something like the following:
$varToReplace -match '%S+%'
But this will then return %replaceme%pathfolder%match2%
How do I match to anytime something appears within percentage signs?
submitted by /u/forthroe
[link] [comments]
The post Powershell and regex matching all instances within % sign appeared first on How to Code .NET.