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 <[email protected]>
it will be cleaned up by the replace regex to this one:
[email protected]
#>
$emailClean = $Email -Replace '^.*?<(.*)>$', '$1'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment