From: vincent Date: 2006-05-25T14:24:20+09:00 Subject: Regexp to esclude substrings I'm trying to resolve a very simple problem, but I'm encountering some issues. Input: "this is a string where you can find some words" Output: [this, string, where, can, find, some, words] So I'm trying to eliminate ' is ', ' a ' and ' you ' from the string (note the spaces, 'this' shouldn't be eliminated just because it includes 'is'). I tried the following (and many others), but it doens't work: my_string = input_string.gsub!(/\s+(is|a|you)\s+/i,' ').split Any hints? -- Posted via http://www.ruby-forum.com/.