Skip to content

Instantly share code, notes, and snippets.

@splorp
Last active October 22, 2021 12:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save splorp/6126c66045a14d90ed3cefbb292e0140 to your computer and use it in GitHub Desktop.
Save splorp/6126c66045a14d90ed3cefbb292e0140 to your computer and use it in GitHub Desktop.
Regex Email Address Obfuscation

Find:

([a-zA-Z0-9])[a-zA-Z0-9\.\-\+\_\$]+\@([a-zA-Z0-9])[a-zA-Z0-9\.\-\+\_]+\.([a-zA-Z0-9]+)

Replace:

\1____@\2____.\3

Input:

abcde@fghij.xyz

Output:

a____@f____.xyz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment