[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Found a solution if (preg_match("/Form:[ ]*(.+)[ ]*<(.+)>/", "Form:Henry <[EMAIL PROTECTED]>", $info)) { print_r($info); } else print "Pattern not found"; but I'm refining it so that it doesn't need the last bit, any more pointers appreciated!!! Thanks All Henry "Henry Grech-Cini" <[EMAIL PR

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
I tried if(preg_match("/^From:(.*)$/", $headers[$line], $info)) { echo "["; print_r($info); echo "]"; echo "",HtmlSpecialChars($headers[$line]),""; } But all I get is [Array ( [0] => From: [1] => ) ] From: Henry< henry @ .com > Any pointers? "Henry Grech-Cini

[PHP] Re: using preg_match to extract information from pop3

2003-03-04 Thread Henry Grech-Cini
Hi All, This has to be easy to do using preg_match! Can no one spare a minute of their time? Henry "Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi All, > > I know that you will probably tell me to RTFM but I have (several times) and > I cannot quite understand