Re: [PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-19 Thread Jochem Maas
Cameron B. Prince schreef: Hello, I¹ve run into a problem with a regex and need help determining if this is my mistake or a bug. The regex is for inserting a SID into every link in the buffer before it¹s flushed, but only when each link doesn¹t already have a SID. 1. you really shouldn't be st

Re: [PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-18 Thread Cameron B. Prince
; > -Original Message- > From: Cameron B. Prince [mailto:[EMAIL PROTECTED] > Sent: Monday, August 18, 2008 12:56 AM > To: php-general@lists.php.net > Subject: [PHP] Negative Look Ahead Regex - Code Mistake or Bug? > > Hello, > > I¹ve run into a problem with a regex and

Re: [PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-17 Thread Lupus Michaelis
Ashley Sheridan a écrit : Hi Cameron, As far as I can tell, you have an error in your syntax. You're using a - (hyphen) character in the first match, but Regex uses this to define a range of characters. That's not valuable if hyphen is the last character of the range set. -- Mickaël Wolf

RE: [PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-17 Thread Simcha Younger
gust 18, 2008 12:56 AM To: php-general@lists.php.net Subject: [PHP] Negative Look Ahead Regex - Code Mistake or Bug? Hello, I¹ve run into a problem with a regex and need help determining if this is my mistake or a bug. The regex is for inserting a SID into every link in the buffer before it¹s fl

Re: [PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-17 Thread Cameron B. Prince
Hi Ash, > As far as I can tell, you have an error in your syntax. You're using a - > (hyphen) character in the first match, but Regex uses this to define a > range of characters. It seems that if you don't escape it, the whole > thing behaves a little strangely. For example, using your URL as the

Re: [PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-17 Thread Ashley Sheridan
Hi Cameron, As far as I can tell, you have an error in your syntax. You're using a - (hyphen) character in the first match, but Regex uses this to define a range of characters. It seems that if you don't escape it, the whole thing behaves a little strangely. For example, using your URL as the sour

[PHP] Negative Look Ahead Regex - Code Mistake or Bug?

2008-08-17 Thread Cameron B. Prince
Hello, I¹ve run into a problem with a regex and need help determining if this is my mistake or a bug. The regex is for inserting a SID into every link in the buffer before it¹s flushed, but only when each link doesn¹t already have a SID. An example of the code is here: $buffer = preg_replace('/