Re: [PHP] regex frustration

2001-02-28 Thread Chris
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., Ash

Re: [PHP] regex frustration

2001-02-28 Thread Simon Garner
From: "Jerry Lake" <[EMAIL PROTECTED]> > 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 sep

[PHP] regex frustration

2001-02-28 Thread Jerry Lake
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