Multiple Blanks in ReplaceAll not regarded as different Patterns?

I'm having trouble with a simple replacement-rule. It seems my understanding of Blanks is wrong. I have an expression containing the following multiple times:

e[a1,a2] e[b1,b2] e[c1,c2]

I want to replace this expression with zero, whenever a2=b2=c2. The following replacement-rule however does nothing to the expression:

e[a1,1] e[b1,1] e[c1,1]/.e[_,a_] e[_,a_] e[_,a_]->0,

whereas the following works:

e[a1,1] e[b1,1] e[c1,1]/.e[_,a_] e[d_,a_] e[f_,a_]->0

I don't really understand why. I know that d_has the Head Pattern, which is why it is colored green in the rule, whereas _ has the Head Blank and is left in black. But that doesn't really help me.

Any help is appreciated!

• Take a look at what e[_, a_] e[_, a_] e[_, a_] -> 0 evaluates to. Then use HoldPattern[e[_, a_] e[_, a_] e[_, a_]] -> 0 to prevent that evaluation. – jjc385 Nov 30 '17 at 19:25
• Or, e[a1, 1] e[b1, 1] e[c1, 1] /. Repeated[e[_, a_]] e[_, a_] -> 0 – march Nov 30 '17 at 22:04
• @jjc385 Thank you! I didn't consider that – AstanVizu Nov 30 '17 at 22:59