I never knew that functionality was there - good stuff!
I couldn't do this in WordPad or NotePad but I could do it in Word. I
had a few difficulties with the dots but got this to work (after, as
John Marshall suggests, converting all upper case .RIB to .rib):
in the Find what box:
(*)(SMTP:*.rib)(*)
in the Replace with box:
\2^p