On Fri, 7 May 2021 07:58:18 -0700 (PDT) John Hardin wrote: > On Sun, 2 May 2021, Loren Wilton wrote: > > > Now consider variable capture from the message: > > > > header __SUB_CAP Subject:Capture /Your (\w+) Order/i > > $(__COMPANY)=\1 > > I like this syntax. I was thinking that the capture would be implied > - any capturing group in a rule would automagically save its (single) > match in a variable named after the rule (kept separate from the > rule's score) for later use, but I like the explicit nature of this > approach.
An alternative approach is creating new strings from parsed data: string TO_BODY = TO:addr ":" BODY(500) string TO_BODY ~= /<whatever>/ the advantage of this is that there are no dependencies. I'm thinking that BODY(500) would be a multi-line string constructed from the first 500 byte of the rendered body. For me having multi-line body matching is more important than any of this.