Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-07-07 16:33
Flavor·PCRE2 (PHP)

/
(\w)(.+?)(@)(\w)(.+?)(.\w+$)
/
gm
Open regex in editor

Description

An expression that obfuscates with * following this rule:

<First char from email local part><Five fixed masked symbols>@<first domain letter><Five fixed masked symbols>.<tld domain>

Example: Input: eagles.willys@willbethebest.co.uk Output: e*****@w*****.uk

Submitted by Ernesto Janebro