$text = preg_replace('{ \b # Capture the address to $1 . . . ( \w[-.\w]* # username @ [-\w]+(\.[-\w]+)*\.(com|edu|info) # hostname ) \b }ix', '$1', # replacement string $text); ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl