The hydrolysis of ethyl 1,4-dimethyl-3-ethoxycarbonylpyrrole-2-acetate (I) with refluxing aqueous NaOH gives 3-carboxy-1,4-dimethylpyrrole-2-acetic acid (II), which is partially esterified with refluxing ethanol - dry HCl yielding ethyl 3-carboxy-1,4-dimethylpyrrole-2-acetate (III). The decarboxylation of (III) by heating at 190-210 C affords ethyl 1,4-dimethylpyrrole-2-acetate (IV), which by a Vilsmeier aroylation with p-chloro-N,N-dimethylbenzamide (A) and POCl3 in refluxing dichloroethane is converted into ethyl 5-p-chlorobenzoyl-1,4-dimethylpyrrole-2-acetate (V). Finally, this product is hydrolyzed with refluxing aqueous 1N NaOH.
The starting product ethyl 1,4-dimethyl-3-ethoxycarbonylpyrrole-2-acetate (I) can be obtained by condensation of diethyl acetonedicarboxylate (X) with chloroacetone (IX) by means of methylamine in water, the compound (XI) being formed as an intermediate which is not isolated. The Friedel-Crafts aroylation of (I) with p-chlorobenzoyl chloride (B) and AlCl3 in refluxing dichloroethane gives ethyl 5-(p-chlorobenzoyl)-1,4-dimethyl-3-ethoxycarbonylpyrrole-2-acetate (VI), which by hydrolysis with aqueous 1N NaOH yields 5-(p-chlorobenzoyl)-1,4-dimethyl-3-carboxypyrrole-2-acetic acid (VII). The partial esterification of (VII) with ethanol and HCl produces ethyl 5-(p-chlorobenzoyl)-1,4-dimethyl-3-carboxypyrrole-2-acetate (VIII), which by decarboxylation at 210-30 C is converted into the ester (V) already obtained.