<div dir="ltr">Hi Alexander,<div><br></div><div>Yes, I think the example code that I shared would be present in a filter function. Specifically the question is with respect to filtering out all BGP communities <i>except</i> one that starts with a given value.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 29, 2020 at 11:35 AM Alexander Zubkov <<a href="mailto:green@qrator.net">green@qrator.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
Take a look at the "filter" function. I think it is what you want.<br>
<br>
On Thu, Oct 29, 2020 at 3:26 PM Brooks Swinnerton <<a href="mailto:bswinnerton@gmail.com" target="_blank">bswinnerton@gmail.com</a>> wrote:<br>
><br>
> Hello,<br>
><br>
> Is it possible to delete all BGP communities from prefixes learned from a specific BGP session except ones that start with a given value? For example something like:<br>
><br>
> if (bgp_path ~ 64496) then {<br>
> bgp_large_community.delete([(!64496, *, *)]);<br>
> }<br>
><br>
> I haven't tested this syntax, but I can't imagine it would work. I'm mostly curious if there's a concept of "except" when deleting BGP communities.<br>
</blockquote></div>