From: Phillip Gawlowski Date: 2011-07-25T00:26:54+09:00 Subject: Re: Help with Regex On Sun, Jul 24, 2011 at 5:11 PM, Gregory Ma wrote: > I need help with a Regular Expression, I need to split the text on "- " > on get the first element. Try String#split: >> ary = "I want this - not that.".split(" - ") => ["I want this", "not that."] >> ary[0] => "I want this" -- Phillip Gawlowski phgaw.posterous.com | twitter.com/phgaw | gplus.to/phgaw A method of solution is perfect if we can forsee from the start, and even prove, that following that method we shall attain our aim.               -- Leibniz