title: Regex parsing citation issue
body: <p>I am trying to extract citations from a PDF. I confirmed that my regex worked on Rubular <a href="http://rubular.com/r/zTOYp7K1Yv" rel="nofollow">here</a> but when I test my code on a real PDF it spits out some oddly spaced and wrong information. How can I fix this regex so it only extracts APA paper citations (the ones in the references section, not in-text). The APA <a href="https://www.library.cornell.edu/research/citation/apa" rel="nofollow">Examples</a> might be useful. I am trying to get references from a research paper.
  If you need more details please let me know. Multiple regex are acceptable for this answer, but I do need to be able to extract author, title, date, and journal. My attempt is below if it helps anybody: </p>
  
  <pre><code>require 'pdf-reader'
  io = open('https://vhil.stanford.edu/pubs/2007/yee-proteus-effect.pdf')
  out=open('dump.txt',"w")
  reader = PDF::Reader.new(io)
  
  reader.pages.each do |page|
      /([a-zA-Z.,&amp;\s]+?)(\(\d+\)).([\sa-zA-Z,:\n\t]+).([\sa-zA-Z,]+).([\sa-zA-Z,]+)/.match(page.text){|m|
          puts "===CITATION===="
          puts "author: "+m[0].to_str.gsub(/\n\r\t/,'')
          puts "title: "+m[2].to_str.gsub(/\n\r\t/,'')
          puts "date: "+m[1].to_str.gsub(/\n\r\t/,'')
          puts "journal: "+m[3].to_str.gsub(/\n\r\t/,'')
    }
    #puts page.raw_content
  end
  puts"\n\n\n=======\n\n\n======"
  puts reader.pages.last
  </code></pre>
  
  <p>More examples (in response to comments) <a href="http://rubular.com/r/Y7tTjVRuoz" rel="nofollow">here</a> and <a href="http://rubular.com/r/HXsBv6XW0o" rel="nofollow">here</a>
  <strong>THE ENTIRE PAPER</strong><a href="http://rubular.com/r/PWLq8RLrX2" rel="nofollow">here</a></p>
  
  <p>To get these examples I ran <code>out.puts page.text</code> inside my foreach loop. Then I copied chunks of text into Rubular and tested using my original regex (above).</p>