Quran Al-Furqan 25:27
وَيَوۡمَ يَعَضُّ ٱلظَّالِمُ عَلَىٰ يَدَيۡهِ يَقُولُ يَٰلَيۡتَنِي ٱتَّخَذۡتُ مَعَ ٱلرَّسُولِ سَبِيلٗا
Translation
And the Day the wrongdoer will bite on his hands [in regret] he will say, "Oh, I wish I had taken with the Messenger a way.