I'm building a little test console for a ruby project. When using a
function I might get something like this:

input_string ="and stuff and nice things not bad girls not greasy boys
and girlsandboys"

As you already have guessed, I want the following in some kind of
format:

smoking_table = {"and" => ["stuff", "nice things", "girlsandboys"],
"not" => ["bad girls","greasy boys"]}

Thus, a regexp that splits a string on code words like "and" and "not"
is what I need.

Please help me
-- 
Posted via http://www.ruby-forum.com/.