On Thu, 25 Jul 2002, Nicklas af Ekenstam wrote:
> I'm trying to do some parsing of mail headers and since not all
> headers follow the pattern:
> 
> X-Header-A: A string
> X-Header-B: Another string that is longer
> X-Header-C: And this string is very very long compared
> 
> But may very well look like this:
> 
> X-Header-A: A string
> X-Header-B: Another string that is 
>  longer
> X-Header-C: And this string is very very long 
>           compared

I imagine you want something like (untested):

$str = preg_replace('/\n[ \t]+/s', ' ', $str);

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to