Re: Squid 3.4.0.1 configurator problems

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Fri, 27 Sep 2013 10:55:49 -0600

On 09/27/2013 01:05 AM, Amos Jeffries wrote:

> :-) "if I understand it correctly" is precisely my point. Even you with
> your skills reading syntax have to go slowly and you still fell for the
> trap.

Sorry I misunderstood you. I had no idea what you are getting at with
that example, so I had to take a wild guess that you are trying to
escape '/' characters which is not needed when using "re". I was not
trying to count your backslashes or anything crazy like that.

I think we all agree that using quotes for REs is not ideal because
backslashes become special. Same for '/'. Same for (). Same for []. The
ideal solution is to let the admin pick the delimiter.

>> Using approach (2) with flexible RE delimiter, we could write
>>
>> acl foo url_regex /ends[) (]/
>> or
>> acl foo url_regex {ends[) (]}
>> or
>> acl foo url_regex @ends[) (]@
>>
>> and it will all work without double escaping.

However, all decent languages still have to _allow_ for escaping: It
becomes necessary (or at least very convenient) when a portion of
configuration is generated by a tool (that does not want to search for a
character NOT used in the expression, if any).

Please note that we can keep supporting REs the way we do now, as a
relaxed_value. The only problem with the current approach is that you
cannot have a regex with a literal space (" ") character in it. That is
the price for not having to deal with RE delimiters (and double escaping
they cause).

Does our regex library support some kind of special spaceless sequence
to denote a space and only a space (ASCII code 32)? \s does not work
because it also matches a tab (not to mention locale issues). I could
not find the answer in glibc docs.

Thank you,

Alex.
Received on Fri Sep 27 2013 - 16:56:12 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 27 2013 - 12:00:11 MDT