Sebastian Hungerecker
2/15/2008 4:52:00 PM
Joachim Glauche wrote:
> email = "me@mine.com"
> email[0..-1].gsub(/./){|c| c+"​"}+email[-1..-1]
I guess you want that to be email[0..-2] not email[0..-1] (otherwise you'll
have the last character twice). Anyway, here's my gsub solution:
email.gsub(/(.)(?=.)/, '\1​')
HTH,
Sebastian
--
Jabber: sepp2k@jabber.org
ICQ: 205544826