I have the following log entry that I am processing in PowerShell I\'m trying to extract all the activity names and durations using the -match
operator but I am onl
I was able to get all of the groups by defining a Regex and then calling .Matches on that Regex. Still curious to know if this can be done with the -match operator in PowerShell.
$detailRegex = [regex]"(Get\sClient\sModel|Parse\sExpression|Get\sAbstract\sQuery|Compile\sQuery|Execute\sQuery|Get\sQuery\sPlan\sComplexity|Async\sTotal|Total)\s-\sduration\(([0-9]*)"
$detailRegex.Matches($formattedMessage)