From: Gavin Kistner Date: 2006-09-13T04:52:13+09:00 Subject: Re: removing spaces between single characters with regual expression From: ciapecki [mailto:ciapecki@gmail.com] > > irb(main):006:0> s.gsub( /\b([a-z]) (?=[a-z]\b)/i, '\\1' ) > > => "A long cat and a quick mouse met oj simpson on the tcp stack" > > this is exactly what I need. > Is it possible to rewrite it without using lookahead (?=subexp) ? I don't think so, unless you have a positive lookbehind instead. Why don't you want the lookahead? Are you actually using this regexp with a language other than Ruby?