From: Phrogz Date: 2007-06-16T00:05:10+09:00 Subject: Re: str.scan On Jun 15, 12:13 am, Peter Szinek wrote: > 2) What I really believe you want is > > items = page.scan('
  • .*?
  • ') > > ? adds greediness to your regexp - so instead of matching the first >
  • . then matching as much as possible of anything, then matching the > *last*
  • , 2) will match as less as possible. Minor pedantic correction: .* is greedy (it grabs as much as it can). The question mark makes it non-greedy (stop as soon as you've found a match).