From: Max Williams Date: 2007-12-15T02:48:46+09:00 Subject: simple way to turn "foo and bar" to "+foo +bar" I want to add a slightly hacky feature into my boolean mysql search which lets users write 'foo and bar', which is then translated into '+foo +bar' (ie both 'foo' and 'bar' must be present) before being passed to the search. Similarly, "foo and bar and snafu" should be translated into "+foo +bar +snafu". I'm sure there must be a simple way to do this but i'm new to ruby and have got bogged down in loads of nested ifs and exceptions already. Can anyone help with an elegant solution? thanks max -- Posted via http://www.ruby-forum.com/.