Re: [PHP] preg_replace strange behaviour, duplicates

2008-08-20 Thread Micah Gersten
You know what's not supposed to be next in the second string, and that's the word Duo. Thank you Micah Gersten onShore Networks Internal Developer http://www.onshore.com Adz07 wrote: > Problem is that a negative assertion assumes i know what is going to come > after the match, but i don't. I

RE: [PHP] preg_replace strange behaviour, duplicates

2008-08-18 Thread Simcha Younger
Simcha Younger -Original Message- From: Adz07 [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 10:17 AM To: php-general@lists.php.net Subject: Re: [PHP] preg_replace strange behaviour, duplicates Problem is that a negative assertion assumes i know what is

Re: [PHP] preg_replace strange behaviour, duplicates

2008-08-18 Thread Adz07
Problem is that a negative assertion assumes i know what is going to come after the match, but i don't. I am a bit stuck now :( Adz07 wrote: > > I am trying to nail down a bit of code for changing processor names > depending on matches. > Problem i am having is the replacement takes place then

Re: [PHP] preg_replace strange behaviour, duplicates

2008-08-15 Thread Micah Gersten
Take a look at the negative assertions on this page: http://us2.php.net/manual/en/regexp.reference.php Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Adz07 wrote: > I am trying to nail down a bit of code for changing processor names depending > on matches. >

[PHP] preg_replace strange behaviour, duplicates

2008-08-15 Thread Adz07
I am trying to nail down a bit of code for changing processor names depending on matches. Problem i am having is the replacement takes place then it seems to do it again replacing the text just replaced as there are similar matches afterwards. example (easier) $string = "The new Intel Core 2 Duo