s = '''<span class="sale">
     $14.99
    </span>, <span class="sale">
     $27.99
    </span>, <span class="sale">
     $66.99
    </span>, <span class="sale">
     $129.99
    </span>, <span class="sale">
     $254.99
   </span>'''

>>> for line in [l.strip () for l in s.splitlines ()]:
          if line [0] == '$': print line

$14.99
$27.99
$66.99
$129.99
$254.99

Why parse? Why regular expressions? 

Frederic


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to