From: Robert Dober Date: 2008-12-12T20:52:50+09:00 Subject: Re: how do I extract the ID name of a Div and its content? Disclaimer: If there are other ' somewhere in the document (comments, CDATA sections, Text elements) this will miserably break and you need HPricot or other HTML parsers. If however your data is simple enough and you can fulfill the prerequisite it becomes very easy... robert@siena:~/log/ruby/ML 12:56:41 505/6 > cat strings.rb && ruby strings.rb #!/usr/bin/ruby # vim: sw=2 ts=2 ft=ruby expandtab tw=0 nu syn=on: # file: strings.rb text = DATA.read p text.scan /'(.*?)'/ __END__