httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Ralf S. Engelschall)
Subject Re: cvs commit: apache-1.3/src/helpers UpdateHide
Date Wed, 04 Mar 1998 13:39:48 GMT

In article <34FD56F2.7129B797@Golux.Com> you wrote:
> Ralf S. Engelschall wrote:
>>   -        next if ($name =~ m:^ap(_)|(api):);
>>   +        next if ($name =~ m/^ap(?:_|api)/);

> I'm not going to veto, but I *am* going to complain: I find
> this an UNimprovement.  IMO it makes things harder to read
> rather than easier.  What's your point?

> As long as the function it performs isn't removed from the
> script, that's all I'm going to say about it.

Hmm... seems like either you are not such familiar with Perl regex or really
wanted to match a different thing. I assumed here that you want to match the
following types of symbols:


My regex is _exactly_ the regex to match this _correctly. It doesn't even
produce backrefs which are not needed (the "?:" stuff). Your regex

   1. creates two backreferences which are never used
      (even for two constant items, the "_" and "api")

   2. matches more functions:

And I really think that you don't wanted XXXapiXXXX to be matched, too.  When
I'm wrong here and you really wanted to match these also then please revert my
change, Ken.
                                       Ralf S. Engelschall

View raw message