Re: Splitting a string by a ,

From: Date: Fri, 05 Dec 2003 15:47:36 +0000
Subject: Re: Splitting a string by a ,
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31918@lists.php.net to get a copy of this message
John Dillon schrieb:
I don't wish to hyjack this string but there is a module in perl for extracting emails from files, I could not get it to work but wonder is there any pre-written function in php that would parse text and extract the emails. I wish to do it with pst files, ie people who have written to me over time in order to get them into a manageable database.
Hi, you should use a regular expression with preg_match_all. I googled for "php grab email" and found for example this http://codewalkers.com/seecode/404.html It uses this preg_match_all("/\b\w+\@\w+[\.\w+]+\b/", $str, $output); but i am sure there are plenty ways to grab those emails from a string. Bye, Karsten Eichentopf

« previous php.db (#31918) next »