text: In diazo transfer certain carbon acids react with tosyl azide in the presence of a weak base like triethylamine or DBU.  The byproduct is the corresponding tosylamide (p-toluenesulfonamide).  This reaction is also called the Regitz diazo transfer. Examples are the synthesis of tert-butyl diazoacetate and diazomalonate. Methyl phenyldiazoacetate is generated in this way by treating methyl phenylacetate with p-acetamidobenzenesulfonyl azide in the presence of base.
  The mechanism involves attack of the enolate at the terminal nitrogen, proton transfer, and expulsion of the anion of the sulfonamide.  Use of the β-carbonyl aldehyde leads to a deformylative variant of the Regitz transfer, which is useful for the preparation of diazo compounds stabilized by only one carbonyl group.