From: Robert Keller Date: 2007-11-02T03:31:03+09:00 Subject: regex question --0-1064893069-1193941849=:59779 Content-Type: text/plain; charset=us-ascii I have a string = "this is text that I want to 9 9.90 89 9 ii8 u" using str = string.gsub(/(?!\d)\b\s\b(?!\d)/,'-') i get "this-is-text-that I want-to 9 9.90 89 9-ii8-u" ^ ^ there problem is that I do not want the "-" to show up if the last char is a digit or the first chat is a digit. Got real close, but I think I need lookbehind which is not supported in ruby? ------------------------------ Robert Keller rlkeller@yahoo.com --0-1064893069-1193941849=:59779--