Re: Dividing, and keeping, text from the first space

From: Date: Thu, 10 Aug 2006 04:48:14 +0000
Subject: Re: Dividing, and keeping, text from the first space
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-240439@lists.php.net to get a copy of this message
Robert, Thank you for responding.
The extra slashes are to properly escape the backslash character since you are using double quotes.... As I said you may want the following pattern in cases where no space exists:
    '#^([^\s]*)\s?(.*)$#'
Thank you for your detailed explanation. Especially with regards to the impact of double quotes versus single quotes in an expression. I see now that I most likely will find it simpler to use single quotes and avoid having to escape characters excessively.
As you might have seen in a response of mine to another of your postings, all this advice has come together, and my script now accomplishes what I had hoped it would. Thank you and the PHP list in general for the continued great support. -- Dave M G

« previous php.general (#240439) next »