Pyrrole is nitrated with nitric in acetic anhydride since the sulfonitric mixture produces polymerization.

pyrrole-nitration

Mechanism:

Stage 1. Attack of the nitronium acetate formed by the nitric/acetic anhydride mixture.

nitration-pyrrole-attack-the-electrophile

Stage 2. Recovery of aromaticity.

nitration-pyrrole-rearomatization

The most favored positions are 2 and 5 due to the greater stability of the intermediate.