Re: Re: Bug #1683 Updated: Failing to parse/compile a *? pattern.

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: Re: Bug #1683 Updated: Failing to parse/compile a *? pattern.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-8240@lists.php.net to get a copy of this message
> Well, it looks like PHP's will do it with one character. Kind of defeats > the idea of collating. > > from regcomp.c function p_b_coll_elem: > > if (len == 1) > return(*sp); /* single character */ > SETERROR(REG_ECOLLATE); /* neither */ > return(0); > > See there at the end it checks if the length is 1 and if it is everything is > hunky dory. Otherwise, it screws ya. I wonder what would happen if that if > was commented out? You'd have a mess on your hands. The whole point of a collating element is to collate down to a single char. It len isn't 1 here, you aren't collating and you definitely have an ECOLLATE error. -Rasmus

« previous php.dev (#8240) next »