Skip to content

Instantly share code, notes, and snippets.

@tomarbuthnot
Created June 4, 2014 13:36
Show Gist options
  • Save tomarbuthnot/a2f5d27a2b9a2fadf785 to your computer and use it in GitHub Desktop.
Save tomarbuthnot/a2f5d27a2b9a2fadf785 to your computer and use it in GitHub Desktop.
Lync Regex
# Get Extension from TelURI
$LineURI = "$($GetCSUser.LineURI) "
$regex = $LineURI | Select-String -Pattern "tel:\+(?:[0-9]+)+;ext=(?<1>(?:[0-9]+)+)"
$extension = $regex.Matches[0].Groups[1].Value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment