On Wed, Mar 3, 2010 at 8:21 PM, M. G. Devour mdevour@eskimo.com wrote:
The following ought to solve that problem by matching either 0 or 1 occurrences of the double quote after the equals sign:
:0 fhw * ^content-type:.*multipart.*boundary="?/.*
It doesn't. The string still shows up in $MATCH and $TESTVAR with both quote marks intact. WHY?
The / operator has the side-effect of making regular expressions to the LEFT of the / match the MINIMUM possible string, and expressions to the RIGHT of the / match the MAXIMUM possible string. So any RE on the left that ends with a wildcard will always prefer to treat the wildcard as a non-match UNLESS that would cause the RE on the right to fail.