On Thu, Jul 25, 2002 at 12:36:27PM +0200, Nicklas af Ekenstam wrote:
>
> In order to read the headers into an array of header key/value fields
> i would like a reg exp to remove all new lines/line feeds before a
> line starting with one or more white spaces or tabs.
In ereg_replace() you can use [[:space:]] as the pattern and replace it
with ' '. That will grab all whitespace characters and replace them with
a one space.
To do that with preg_replace() use \s.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php