Re: [PHP-DEV] preg_quote: possible arg addition for regex delimiter escaping From: Andrei Zmievski (andrei <email protected>)
Date: 05/26/00

On Thu, 25 May 2000, Chuck Adams wrote:
>
> I'm not sure what an extra flag nets you other than eating up an arg
> slot (since PHP has no named args). It may be additive, but if
> another option gets added, would it be another flag? If it's more
> than a flag's worth of option, is someone going to have to do
> something like:
>
> preg_match("/$regex/", $teststr, PREG_QUOTEDELIM, $blah); ??
>
> When the value of that flag wasn't necessary before?
> This is exactly what preg_quote was designed for, not extra args. I
> personally find using another function to be the most orthogonal and
> therefore most elegant solution.
>
> ... Not that I'd mind seeing named args in PHP though ;)

We are talking about adding extra arg to preg_quote(), which would
specify an additional character to be quoted - usually, it would be the
delimiter. We're not changing preg_match().

-Andrei

Documentation is worth it just to be able
to answer all your mail with 'RTFM'. -- Alan Cox

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>