linuxMaestro
Instructor
I am trying to parse the email address from the "From" head in an email using preg_match:
From: "Tom" <tom@yahoo.com>
I have this syntax but it is not matching it:
if (preg_match("/^From: .* (<.*>))/", $lines[$i], $matches)) {
What should the patten be?
("/^From: .* (<.*>))/",
From: "Tom" <tom@yahoo.com>
I have this syntax but it is not matching it:
if (preg_match("/^From: .* (<.*>))/", $lines[$i], $matches)) {
What should the patten be?
("/^From: .* (<.*>))/",