Searching a string

From: Date: Mon, 10 Jul 2000 10:02:06 +0000
Subject: Searching a string
Groups: php.general 
Request: Send a blank email to php-general+get-5704@lists.php.net to get a copy of this message
Hi there, I have the following problem / question: I'm trying to parse an email message using PHP. The email message always contains some static text for example: From: "Mr.X" <Mr.X@linux.org> To: <i@dont.know> Subject: qweqwe I have the complete file spit in lines in my PHP script. How can i extract the values behind From: To: and Subject: ? I was thinking about using 'ereg' to identify the lines and then use 'substr' to get the rest of the string. I don't really understand how to use the ereg function, can someone please help? Thanks a lot, Jeroen Geusebroek

« previous php.general (#5704) next »