Search squid archive

Re: correct regular expression to use to capture all

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Rob,

It uses more CPU then dstdomain and the equivalent of ssl::server_name  but... You should only care about the cpu
usage in case you have lots of regex in your config files.

Usually a few of them are worth when it gets the job done.
I have some config in my archives that used a lot of regex and if I have used other methods
to implement the same config the config would look ugly and long.

Eliezer

From: squid-users <squid-users-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of robert k Wild
Sent: Sunday, July 9, 2023 18:09
To: Squid Users <squid-users@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re:  correct regular expression to use to capture all

Thank you guys,

Tbh I didn't think regex would be more CPU intense so thanks for that

On Sun, 9 Jul 2023, 16:04 Matus UHLAR - fantomas, <mailto:uhlar@xxxxxxxxxxx> wrote:
On 08.07.23 13:07, robert k Wild wrote:
>True but I don't want to create two ACL lists, one for "ssl name" and one
>for "ssl name regex"

try only create one for ssl name. You rarely need regex.
performance will thank youl

>On Sat, 8 Jul 2023, 12:57 Matus UHLAR - fantomas, <mailto:uhlar@xxxxxxxxxxx> wrote:
>
>> On 07.07.23 21:13, robert k Wild wrote:
>> >i know ive been talking about this before but i want to understand why i
>> >cant use this regex
>> >
>> >(^|.*)http://redshift3d.com$
>> >
>> >instead i have to use this
>> >
>> >(^|\.)http://redshift3d.com$ OR
>> >
>> >(^|\.)redshift3d\.com$
>> >
>> >for strings
>> >
>> >http://www.redshift3d.com
>> >http://activate.redshift3d.com
>> >http://redshift3d.com
>>
>> AFAIK "dstdomain .http://redshift3d.com";
>>
>> matches the same, but without complicated, cpu-expensive and hardly
>> readable
>> regular expressions

-- 
Matus UHLAR - fantomas, mailto:uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Depression is merely anger without enthusiasm.
_______________________________________________
squid-users mailing list
mailto:squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux