[Bro-Dev] patterns and &&/|| vs. &/| operators
jsiwek at corelight.com
Thu Jun 21 12:33:39 PDT 2018
On Thu, Jun 21, 2018 at 1:34 PM Vern Paxson <vern at corelight.com> wrote:
> > The meaning of "p1 & p2" would be "yields a pattern that matches both
> > p1 and p2" versus the meaning of "p1 && p2" currently being "yields a
> > pattern that matches a p1 followed by a p2" ?
> No, p1 & p2 would be the new way to express p1 && p2.
> > I'd generally say that deprecating (emit a warning message pointing to
> > each usage) for a time period is a more cautious approach.
> Easy 'nuf, though I'd be amazed if anyone is using p1 && p2 given it's
> not documented and not intuitive!
Ok, I see now, yeah & would be better than && for that semantic,
though maybe p1 + p2 would be even better at expressing that
concatenation is happening?
I also notice from :
‘r/s’: an ‘r’ but only if it is followed by an ‘s’ ...
Maybe another option?
Just making suggestions since I didn't quite get what p1 & p2 would do at first.
More information about the bro-dev