httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Gearls <nickgea...@gmail.com>
Subject Re: mod_substitute & back-references
Date Thu, 12 Mar 2009 17:13:01 GMT
It's not replaceAll vs. replaceFirst, it's replace recursively or not.
For me, it should not be recursive (independently of the q flag, I agree 
with you Jim).
Actually, if it is recursive, it should be a never-ending replacement in 
this case, which would be a (not voluntary) denial of service. I do not 
expect this.

Nick


Jim Jagielski wrote:
> 
> On Mar 11, 2009, at 5:03 AM, Nick Gearls wrote:
> 
>> Oops, stupid !
>>
>> Anyway, a real problem:
>>     Substitute s|(toreplace)|*replaced[$1]*|qi
>> translates "toreplace" into 
>> "*replaced[*replaced[*replaced[toreplace]*]*]*"
>>
>> Don't we expect the q flag to stop any replacement after the first one?
>>
> 
> Not necessarily, no... it's not a replaceAll vs. replaceFirst
> flag.
> 
> 

Mime
View raw message