Skip to content

Instantly share code, notes, and snippets.

@JimMoyle
Last active February 20, 2024 11:12
Show Gist options
  • Save JimMoyle/affd2637fd71498c55d93d27bb05a8c4 to your computer and use it in GitHub Desktop.
Save JimMoyle/affd2637fd71498c55d93d27bb05a8c4 to your computer and use it in GitHub Desktop.
Cleanup emails from outlook format
<#
If the email is in the format below
Jim Moyle <Jim.Moyle@somedomain.com>
it will be cleaned up by the replace regex to this one:
Jim.Moyle@somedomain.com
#>
$emailClean = $Email -Replace '^.*?<(.*)>$', '$1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment