The triangle anomaly in massless and massive QED is investigated by adopting the symmetry-preserving loop regularization method proposed recently in Refs. 1 and 2. The method is realized in the initial dimension of theory without modifying the original Lagrangian, it preserves symmetries under non-Abelian gauge and Poincaré transformations in spite of the existence of two intrinsic mass scales Mc and μs which actually play the roles of UV- and IR-cutoff respectively. The axial-vector–vector-vector (AVV) triangle diagrams in massless and massive QED are evaluated explicitly by using the loop regularization. It is shown that when the momentum k of external state is soft with
, m2 (m is the mass of loop fermions) and Mc → ∞, both massless and massive QED become anomaly free. The triangle anomaly is found to appear as quantum corrections in the case that m2,
and Mc → ∞. Especially, it is justified that in the massless QED with μs = 0 and Mc → ∞, the triangle anomaly naturally exists as quantum effects in the axial-vector current when the ambiguity caused by the trace of gamma matrices with γ5 is eliminated by simply using the definition of γ5. It is explicitly demonstrated how the Ward identity anomaly of currents depends on the treatment for the trace of gamma matrices, which enables us to make a clarification whether the ambiguity of triangle anomaly is caused by the regularization scheme in the perturbation calculations or by the trace of gamma matrices with γ5. For comparison, an explicit calculation based on the Pauli–Villars regularization and dimensional regularization is carried out and the possible ambiguities of Ward identity anomalies caused from these two regularization schemes are carefully discussed, which include the ambiguities induced by the treatment of the trace of gamma matrices with γ5 and the action of the external momentum on the amplitude before the direct calculation of the AVV diagram.