From: Chris Lowis Date: 2008-09-18T18:19:38+09:00 Subject: Re: Suggestion for string parsing > But I'm sure there's a better way, even considering that the number of > parameters can increase and I don't want to write a long regular > expression rule, that is hard to read. Are the parameters always delimited by commas ? In which case you could modify the regular expression line =~/(\w*)=(.*)/ Then $2 #=> "MPEG-4,390000,700000,24000" $2.split(",") #=> ["MPEG-4", "390000", "700000", "24000"] Returns you the values after the '=' sign in line as an array. For more power you could pass this sub-string to a CSV parsing library such as FasterCSV. Chris -- Posted via http://www.ruby-forum.com/.