Sahih al-Bukhari
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لاَ تَدْخُلُوا عَلَى هَؤُلاَءِ الْقَوْمِ إِلاَّ أَنْ تَكُونُوا بَاكِينَ فَإِنْ لَمْ تَكُونُوا بَاكِينَ فَلاَ تَدْخُلُوا عَلَيْهِمْ أَنْ يُصِيبَكُمْ مِثْلُ مَا أَصَابَهُمْ "
Narrated `Abdullah bin `Umar:
(While we were going for the Battle of Tabuk and when we reached the places of the dwellers of Al- Hijr), Allah's Messenger (ﷺ) said about the dwellers of Al-Hijr (to us). "Do not enter (the dwelling places) of these people unless you enter weeping, but if you weep not, then do not enter upon them, lest you be afflicted with what they were afflicted with."
Full reference and source
Sahih al-Bukhari USC-MSA web (English) : Vol. 6, Book 60, Hadith 225 Arabic : Book 65, Hadith 4702
View source on Sunnah.com (opens in a new tab)