Mus'ab bin Sa'd narrates that when semen would get on Sa'd bin Abi Waqqas's (may Allah be pleased with him) clothes, if it was wet, he would clean it, and if it was dry, he would rub the clothes, and then he would pray in them.
Hadith Referenceمسند الإمام الشافعي / كتاب الطهارة / 27
Hadith Takhrijصحيح فقد توبع شيخ الشافعي: أخرجه ابن أبي شيبة: 918، 919 - والبيهقي في السنن الكبرى: 2/ 418 وفي معرفة السنن والآثار له (1261).