[squid-users] regex for normal websites

robert k Wild robertkwild at gmail.com
Wed Jul 27 17:25:46 UTC 2022


nice one thanks Amos

i dont understand as in regex the terms

^ - start of line
. - any single character
* - repetition of character before
$ - end of line

 so going by this it should be

^.*adobe.com$

how come just

adobe.com$

as it doesnt know before adobe ie http(s)://www

sorry for the stupid question

On Wed, 27 Jul 2022 at 12:28, Amos Jeffries <squid3 at treenet.co.nz> wrote:

> On 27/07/22 21:54, robert k Wild wrote:
> > hi all,
> >
> > think i got it right but just want to double check with you guys
> >
> > so in my "ssl::server_name" i had
> > .adobe.com
> >
> > that worked but i want to mix normal website and regex websites together
>
> What do you mean "normal website" ? and "regex websites" ?
>
>
> > so i just have one list for all
> >
> > i now have this for "ssl::server_name_regex"
> > ^.*adobe.com$
> >
> > it works, so im guessing its right
> >
>
> Many things "work" in regex when they are not right.
>
> As Matus said the dot in the domain needs to be escaped:
>
>    ^.*adobe\.com$
>
>
> Also, the "^.*" in your pattern does nothing useful, it should be omitted.
>
> Leaving you with the pattern:
>
>     adobe\.com$
>
>
> HTH
> Amos
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>


-- 
Regards,

Robert K Wild.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20220727/63123d78/attachment.htm>


More information about the squid-users mailing list