You could instead grab the whole boundary parameter in one step, then strip the quotes after that:
Cary, thanks for the input...
How do I get the literal ctrl-M into the bracket expression? Type ctrl- M into nano? It would make the regexp seem to break across a line?
The second recip looks like a simple way to get rid of the quotes if they're there.
:0 H # NOTE: The ^M in the RE needs to be a literal carriage # return, not the two separate characters ^ and M. # Procmail does not support control-character escapes. # This is necessary because some mail comes in with CR-LF # line endings, and you don't want the CR included in the match.
- ^Content-Type:\W*<multipart.*<boundary=/[^; ^M]*
{ TESTVAR = $MATCH
:0
- TESTVAR ?? "/[^"]*
{ TESTVAR = $MATCH } }