Simple problem with pattern matching in Mathematica I'm having trouble setting a pattern for simplifying a complex expression.  I've distilled the question down to the simplest case where Mathematica seems to fail.
I set up a simple rule based on a pattern:
simpRule = a b v___ - c d v___ -> e v

which works on the direct case
a b - c d /. simpRule
e

but fails if I simply add a minus sign.
-a b + c d /. simpRule
-a b + c d

How do I go about writing a more robust rule?  Or perhaps there's a better way to go about performing simplifications of this sort?
Thanks,
Keith

You need to be aware of the FullForm of the expressions you are working with to correctly use replacement rules.  Consider the FullForm of the two expressions you use ReplaceAll (/.) on:
 a b - c d // FullForm
-a b + c d // FullForm

(* Out *) Plus[Times[a, b], Times[-1, c, d]]
(* Out *) Plus[Times[-1, a, b], Times[c, d]]
From this you can see how the negation is internally represented as multiplication by -1, and therefore, why your rule matches differently.  One way to allow for the alternative pattern is this:
rule = (-1 a b v___ | a b v___) + (-1 c d v___ | c d v___) -> e v;

This makes use of Alternatives.
Another, somewhat more opaque way is:
rule = (-1 ...) a b v___ + (-1 ...) c d v___ -> e v;

Which makes use of RepeatedNull.
