The official text
Old and new, side by side
Indian Penal Code, 1860
Section 397 Robbery, or dacoity, with attempt to cause death or grievous hurt
If, at the time of committing robbery or dacoity, the offender uses any deadly weapon, or causes grievous hurt to any person, or attempts to cause death or grievous hurt to any person, the imprisonment with which such offender shall be punished shall not be less than seven years.
Bharatiya Nyaya Sanhita, 2023
Section 311 Robbery, or dacoity, with attempt to cause death or grievous hurt
If, at the time of committing robbery or dacoity, the offender uses any deadly weapon, or causes grievous hurt to any person, or attempts to cause death or grievous hurt to any person, the imprisonment with which such offender shall be punished shall not be less than seven years.
The texts are India Code’s. The amendment markers and footnotes of the official print are left out, so the old section reads as it stood when it was repealed; State amendments are not shown. The PDFs linked below carry the full history.