Remove plus sign (+) aliases from email addresses
Disclaimer
This article has been created to demonstrate how useless these type of aliases are.
Issue
You have a list of email addresses and you would like to remove the + sign followed by an alias from it automatically.
Example :
mymail+alias@domain.tld
… should become …
mymail@domain.tld
Solution
Use the following regex to replace the entire +alias@ string by only the @ character.
$string = "mymail+alias@domain.tld";
$string -replace "\+[^:]*@", "@"
Source
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.