Hello,
I've got some enormous RTF files and I need to get a count of the number
of footnotes in them. So, I'm trying this:

Dir.chdir("T:/rtf")
file_contents = File.read("1.rtf")
 count = file_contents.count "\footnote"
 puts count

I'm getting an enormous value (115683) in the hundreds of thousands.
And, with my text editor, I know that there are only hundreds (582). Can
someone please explain why this is happening?

Thanks,
Peter

-- 
Posted via http://www.ruby-forum.com/.