On Sep 13, 2005, at 1:46 PM, Berger, Daniel wrote: > In the former, sub != gsub. In the latter, you need multi-line mode > because of the "\n\n": > > # Without /m > irb(main):026:0> html =~ /<p>(.*?)<\/p>(.*)/ > => 0 > irb(main):027:0> $1 > => "one" > irb(main):028:0> $2 > => "" > > # With /m > irb(main):023:0> html =~ /<p>(.*?)<\/p>(.*)/m > => 0 > irb(main):024:0> $1 > => "one" > irb(main):025:0> $2 > => "\n\n<p>two</p>" Yep, that's what I was forgetting. Thanks for the lesson. James Edward Gray II