$members=<<<TEXT Name E-Mail Address ------------------------------------------------ A i@example.com D k@example.com M m@example.org B b@example.net TEXT; print preg_replace('/[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}/', '[ address removed ]', $members);