From: Adam Akhtar Date: 2008-08-26T16:33:29+09:00 Subject: word boundaries for regular expressions Hi did a search for word boundaries but didnt quite find what i was looking for. If i have strings containing products and model numbers e.g. "JP-ATH Headphones JP" and I want to remove the last JP but not the one in the modle number how do i go about it, i tried string.gsub(/\bJP\b/, '') but it removes both. I guess the hypen in the model number doesnt count as a word letter so it gets knocked off. am i doing something wrong here? -- Posted via http://www.ruby-forum.com/.