Bill Kelly
1/4/2008 10:35:00 PM
From: "Rick DeNatale" <rick.denatale@gmail.com>
> On Jan 4, 2008 1:34 PM, Bill Kelly <billk@cts.com> wrote:
>>
>> require 'net/http'
>> _,x = Net::HTTP.new("en.wikipedia.org").get("/wiki/Fictional_races_in_South_Park")
>> p x.tr('Mm','Zz').gsub(/ez/,'em').gsub(/arklar/,'edhsaw').scan(/Ze\w+,\s+th.*,\s+or\s+z\w+s./m)
>
> umm should that last line be:
>
> p x.tr('Mm','Zz').gsub(/ez/,'em').gsub(/arklar/,'edshaw').scan(/Ze\w+,\s+th.*,\s+or\s+z\w+s./m)
>
> or is there a subtlety I missed?
As such things go, immediately after I posted I noticed some glitches
in the output that I had overlooked... :(
Changing the last line to the following produces the intended output.
p x.tr('M','Z').gsub(/arklar/,'edhsaw').gsub(/\bme/,'ze').scan(/Ze\w+,\s+th.*,\s+or\s+z\w+s./m)
:)
Regards,
Bill