Pyrrole is nitrated with nitric in acetic anhydride since the sulfonitric mixture produces polymerization.
Mechanism:
Stage 1. Attack of the nitronium acetate formed by the nitric/acetic anhydride mixture.
Stage 2. Recovery of aromaticity.
The most favored positions are 2 and 5 due to the greater stability of the intermediate.