In this tutorial i will show you how to email address partially using php regex. Many php project need this type speciality. I want to display email from database and I want to only show some character not a all. You may also like How to check validation url www and href in PHP and How to Hide numbers of a Phone Number using PHP.
<?php $email = 'email@example.com'; echo $email = preg_replace('/(?:^|@).\K|\.[^@]*$(*SKIP)(*F)|.(?=.*?\.)/', '*', $email); ?>
And if you like this tutorials please share it with your friends via Email or Social Media.