From: Dave Hoefler Date: 2007-02-13T06:36:04+09:00 Subject: What's the best way of parsing this string? ------=_Part_60176_13268707.1171316161560 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi there, I have a question about string search and replacement. Let's say I have this string that contains 2 links for embedding youtube videos amongst some other random text. string = "We've got some junk text here" + "" + "" + "And we've got some more junk text right here" + "" + "" + "more garbage text here" I'd like to get the value of the 'value' attributes (" http://www.youtube.com/v/qqsyXdj_p_I" and " http://www.youtube.com/v/yYqACgndOQA" respectively) and convert the string into the following: We've got some junk text here
And we've got some more junk text right here
more garbage text here What would be the best library to use for parsing and replacing certain values in a string? I've done simple .gsub'ing before, but this seems to be a little more complicated ;-) Thanks, Dave Hoefler ------=_Part_60176_13268707.1171316161560--