[squid-users] correct regular expression to use to capture all
Stuart Henderson
stu.lists at spacehopper.org
Sat Jul 8 10:14:32 UTC 2023
On 2023-07-07, robert k Wild <robertkwild at gmail.com> wrote:
> --===============6398075081121841451==
> Content-Type: multipart/alternative; boundary="000000000000a03dcc05ffeb4428"
>
> --000000000000a03dcc05ffeb4428
> Content-Type: text/plain; charset="UTF-8"
>
> hi all,
>
> i know ive been talking about this before but i want to understand why i
> cant use this regex
>
> (^|.*)redshift3d.com$
this matches anythingredshift3d[any single character or nothing]com
> instead i have to use this
>
> (^|\.)redshift3d.com$ OR
this matches redshift3d[any single character or nothing]com
or anything.redshift3d[any single character or nothing]com
> (^|\.)redshift3d\.com$
this only matches redshift3d.com or anything.redshift3d.com
So, if you only want to match on things exactly in the redshift3d.com
domain and no others, you need the last one.
More information about the squid-users
mailing list