Sahih al-Bukhari 3779
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لَوْ أَنَّ الأَنْصَارَ سَلَكُوا وَادِيًا أَوْ شِعْبًا، لَسَلَكْتُ فِي وَادِي الأَنْصَارِ، وَلَوْلاَ الْهِجْرَةُ لَكُنْتُ امْرَأً مِنَ الأَنْصَارِ "
Narrated Abu Huraira:
The Prophet (ﷺ) or Abu l-Qasim said, "If the Ansar took their way through a valley or a mountain pass, I would take Ansar's valley. And but for the migration, I would have been one of the Ansar." Abu Huraira used to say, "The Prophet (ﷺ) is not unjust (by saying so). May my parents be sacrificed for him, for the Ansar sheltered and helped him," or said a similar sentence.
Full reference and source
Sahih al-Bukhari 3779 In-book : Book 63, Hadith 4 USC-MSA web (English) : Vol. 5, Book 58, Hadith 123 (deprecated)
View source on Sunnah.com (opens in a new tab)