[Bro-Dev] pattern values and "||"/"&&" operators
Vern Paxson
vern at icir.org
Thu Apr 26 14:38:39 PDT 2018
> > p1 || p2 returns a pattern that matches either p1 or p2
>
> ... Though having the
> functionality of the former available in some form would be kind of
> nice-I have a few scripts where I would have used that.
Oh I left out that that's in fact supported:
print /foo/ | /bar/ in "hello Barbara";
prints "T" :-). As does
print (/foo/ || /bar/) in "hello Barbara";
(parens now required), which is the one we'd be getting rid of.
Vern
More information about the bro-dev
mailing list