From: Wouss Bla Date: 2008-11-05T16:53:40+09:00 Subject: Double characters in string Hi, I'm looking for a way to put a 'X' between all double characters in a string. So if this would be the string: 'hello, I just said hello' would be changed into 'helXlo, I just said helXlo'. I tried: text = text.sub(/([a-z])\1/,'\1x\1') But this only changed the first double character... Thanks in advance -- Posted via http://www.ruby-forum.com/.