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__
<body>
<div id='pagewrapper'>
<div id='header'>
<p>Ruby Forum is cool</p>
</div>
<div id='navbar'>
<ul>
<li><%= link_to 'Cities', cities_path %></li>
<li><%= link_to 'Restaurants', restaurants_path %></li>
<li><%= link_to 'Categories', categories_path %></li>
<li><%= link_to 'Products',  products_path %></li>
</ul>
[["pagewrapper"], ["header"], ["navbar"], ["Cities"], ["Restaurants"],
["Categories"], ["Products"]]