<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Forget I asked, that was a dumb question since it's a regex and | can be used. /sigh</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Justin</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Justin Lloyd <justinl@arena.net><br>
<b>Sent:</b> Tuesday, April 6, 2021 10:35 AM<br>
<b>To:</b> Dridi Boukelmoune <dridi@varni.sh><br>
<b>Cc:</b> varnish-misc@varnish-cache.org <varnish-misc@varnish-cache.org><br>
<b>Subject:</b> Re: Cookie VMOD keep/filter documentation issue</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Hi Dridi,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Thanks for confirming that! However, is there then a way to get the effect of being able to pass a regex to keep_re() and filter_re()? I just started working with the cookie vmod this morning and this would be a useful feature. As I understand it, Varnish 6.4
 (we're on 6.5) replaced filter() and filter_except() with keep() and keep_re() and that the previous functions
<i>could</i> take CSV strings.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Thanks,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Justin</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Dridi Boukelmoune <dridi@varni.sh><br>
<b>Sent:</b> Tuesday, April 6, 2021 10:29 AM<br>
<b>To:</b> Justin Lloyd <justinl@arena.net><br>
<b>Cc:</b> varnish-misc@varnish-cache.org <varnish-misc@varnish-cache.org><br>
<b>Subject:</b> Re: Cookie VMOD keep/filter documentation issue</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">On Tue, Apr 6, 2021 at 4:11 PM Justin Lloyd <justinl@arena.net> wrote:<br>
><br>
> Hi all,<br>
><br>
> I'm confused on whether cookie.keep_re and cookie.filter_re should work with CSV strings. The documentation at
<a href="https://varnish-cache.org/docs/trunk/reference/vmod_cookie.html">https://varnish-cache.org/docs/trunk/reference/vmod_cookie.html</a> does not explicitly say that those two functions can take a CSV string like the docs for keep and filter do, but the
 example for keep_re uses such string, indicating that it should be able to. However, testing with varnishtest definitely shows that the _re functions do not work with CSV strings. Can anyone clarify what the truth is supposed to be?<br>
<br>
Hi,<br>
<br>
Looking at the examples right now it is clear [1] that filter() and<br>
keep() each take a CSV string. It is also clear [1] that filter_re()<br>
takes a single regular expression [2]. However, the keep_re()<br>
example is both misleading and wrong.<br>
<br>
Thanks for bringing this to our attention!<br>
<br>
<a href="https://github.com/varnishcache/varnish-cache/commit/606977bbfb624ead38e9c8648beac0b3906a4294">https://github.com/varnishcache/varnish-cache/commit/606977bbfb624ead38e9c8648beac0b3906a4294</a><br>
<br>
Dridi<br>
<br>
[1] to me<br>
[2] not to be confused with a singular expression<br>
</div>
</span></font></div>
</div>
</body>
</html>