in reply to stripping everything but numbers and letters

Yes, just like s/[^[:alnum:]]//g;. But if you're dealing with unicode, you'll want s/[^\p{N}\p{L}]//g .