I am looking just for a basic way to clean up my email list of any email addresses whose users contain ONLY numbers. Delete any emails like: But keep emails like: I can obviously delete all emails that start with numbers just by alphabetizing the list and deleting 0-9, but that will remove emails like option 2 above. Thanks.
Hi, Are these emails stored in database? Regards DELETE FROM TableName WHERE email_field RLIKE '^[0-9]+[[.commercial-at.]]'; Code (markup):
function bad_emails($s=''){ return trim($s)&!preg_match('#^\d+@#iu',trim($s)); } $f = file('MyFileName.txt') or die("Error opening file"); print_r(array_filter($f,"bad_emails")); PHP: