Re: [squid-users] Problem with regexp in always_direct ACL

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 23 Feb 2004 12:28:57 +0100 (CET)

On Mon, 23 Feb 2004, Franck Gille' wrote:

> if i put "acl academie dstdom_regex ac-" it's works, but it is'nt restrictive enough.
> i just want this acl match with ac-rouen.fr ac-sddssdf.fr ac-wxcxxwfd.fr .........

The regex for this becomes (^|\.)ac-[^.]*\.fr$

this will match all domains ac-*.fr and it's sub domains.

Explanation:

(^|\.) start of host name or a dot
ac- ac-
[^.] anything except for dot
* the previous thing repeated 0 or more times
\. a dot
fr fr
$ at the end of the host name

Regards
Henrik
Received on Mon Feb 23 2004 - 04:29:07 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:03 MST