From: Joel Pearson Date: 2012-09-14T17:00:27+09:00 Subject: Re: want to get string between specialchars at endof the string The quick way to do that would be: "tesubyrails ".split(" <").each do |el| puts el[0..-2] end If you wanted something a bit more flexible I recommend regex. Do you have more examples, or is this static data you're using? -- Posted via http://www.ruby-forum.com/.