From: Harry Kakueki Date: 2011-07-25T20:28:30+09:00 Subject: Re: Help with Regex > > I need help with a Regular Expression, I need to split the text on "- " > on get the first element. > str = "part 1 - part 2 - part 3" str =~ /-/ p $` # OR p (/-/.match(str)).pre_match Harry