Last active
August 4, 2016 14:08
-
-
Save Dan1el42/7b03afaca598baafbc4cb2b1d6825ba7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Option 1: Access the capture group (\d+) by number. | |
if ($Event[0].Message -match 'sequence number (\d+)') | |
{ | |
$Number = $Matches[1] | |
} | |
# Option 2: Access the number using the named capture group "Number" | |
if ($Event[0].Message -match 'sequence number (?<Number>\d+)') | |
{ | |
$Number = $Matches.Number | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment