<div dir="auto">So will thisĀ <div dir="auto"><br></div><div dir="auto"><span style="font-size:12.8px">(^|\.)redshift3d\.com$</span><br></div><div dir="auto"><span style="font-size:12.8px"><br></span></div><div dir="auto"><span style="font-size:12.8px">I know it will match</span></div><div dir="auto"><span style="font-size:12.8px"><br></span></div><div dir="auto"><span style="font-size:12.8px"><a href="http://Blah.redshift3d.com">Blah.redshift3d.com</a> and</span><span style="font-size:12.8px"><br></span></div><div dir="auto"><span style="font-size:12.8px"><a href="http://redshift3d.com">redshift3d.com</a></span></div><div dir="auto"><span style="font-size:12.8px"><br></span></div><div dir="auto"><span style="font-size:12.8px">But what about</span></div><div dir="auto"><span style="font-size:12.8px"><br></span></div><div dir="auto"><span style="font-size:12.8px"><a href="http://Blah.Blah.redshift3d.com">Blah.Blah.redshift3d.com</a></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 8 Jul 2023, 22:32 Alex Rousskov, <<a href="mailto:rousskov@measurement-factory.com">rousskov@measurement-factory.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7/8/23 06:14, Stuart Henderson wrote:<br>
> On 2023-07-07, robert k Wild <<a href="mailto:robertkwild@gmail.com" target="_blank" rel="noreferrer">robertkwild@gmail.com</a>> wrote:<br>
>> --===============6398075081121841451==<br>
>> Content-Type: multipart/alternative; boundary="000000000000a03dcc05ffeb4428"<br>
>><br>
>> --000000000000a03dcc05ffeb4428<br>
>> Content-Type: text/plain; charset="UTF-8"<br>
>><br>
>> hi all,<br>
>><br>
>> i know ive been talking about this before but i want to understand why i<br>
>> cant use this regex<br>
>><br>
>> (^|.*)<a href="http://redshift3d.com" rel="noreferrer noreferrer" target="_blank">redshift3d.com</a>$<br>
> <br>
> this matches anythingredshift3d[any single character or nothing]com<br>
<br>
Correction: A regular expression "." does _not_ match "nothing" (i.e. <br>
zero characters).<br>
<br>
In some contexts, "." may not even match some special single characters, <br>
but those contexts are probably not applicable to this thread scope.<br>
<br>
<br>
>> instead i have to use this<br>
>><br>
>> (^|\.)<a href="http://redshift3d.com" rel="noreferrer noreferrer" target="_blank">redshift3d.com</a>$ OR<br>
> <br>
> this matches redshift3d[any single character or nothing]com<br>
> or anything.redshift3d[any single character or nothing]com<br>
<br>
... or .<a href="http://redshift3d.com" rel="noreferrer noreferrer" target="_blank">redshift3d.com</a><br>
<br>
Same "nothing" correction here.<br>
<br>
<br>
>> (^|\.)redshift3d\.com$<br>
> <br>
> this only matches <a href="http://redshift3d.com" rel="noreferrer noreferrer" target="_blank">redshift3d.com</a> or <a href="http://anything.redshift3d.com" rel="noreferrer noreferrer" target="_blank">anything.redshift3d.com</a><br>
<br>
... or .<a href="http://redshift3d.com" rel="noreferrer noreferrer" target="_blank">redshift3d.com</a><br>
<br>
<br>
Alex.<br>
<br>
<br>
> So, if you only want to match on things exactly in the <a href="http://redshift3d.com" rel="noreferrer noreferrer" target="_blank">redshift3d.com</a><br>
> domain and no others, you need the last one.<br>
<br>
<br>
<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank" rel="noreferrer">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer noreferrer" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>