Re: regex frustration

From: Date: Wed, 28 Feb 2001 22:23:17 +0000
Subject: Re: regex frustration
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42091@lists.php.net to get a copy of this message
Try the perl compatible one, you can set a limit of how many times to replace: http://www.php.net/manual/en/function.preg-replace.php > I've tried and tried to no avail, can someone assist > I need to select the first space in a line like the following > Nelson Bob and Mary, 123 Street st., Ashton, 555-1212 > > I need to replace the space between Nelson and Bob with > a comma so I can separate the first and last names in my DB > ^\D*\s will select the first name and the space, but I just > need the space. any ideas? > > Jerry Lake - jerryl@europa.com > Web Designer > Europa Communications - http://www.europa.com > Pacifier Online - http://www.pacifier.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#42091) next »