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

2008-08-18 Thread Simcha Younger
Original Message- From: Cameron B. Prince [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2008 4:41 PM To: Simcha Younger; php-general@lists.php.net Subject: Re: [PHP] Negative Look Ahead Regex - Code Mistake or Bug? Hi Simcha, I tried your suggestion and it does prevent the SID from being

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

2008-08-18 Thread Cameron B. Prince
Hi Simcha, I tried your suggestion and it does prevent the SID from being inserted inside the extension, but causes double ?'s and SID's in some cases. Thanks, Cameron On 8/18/08 2:25 AM, "Simcha Younger" <[EMAIL PROTECTED]> wrote: > > Hi > > > You did not put a question mark in your charac

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
Hi You did not put a question mark in your character class ([\/\w\.-] and instead you put it together with the session id. The expression looks for a sequence without which is not followed by the next expression --- ?PHPSESSID\=2u0cca. If it would count the last `p` of `.php` then the next

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