ruby - how to show different content on txt format using nokogiri -


i need full out difference 2 different text file on internet. tried @ answer , of answer direct me nokogiri.

any solution on how pull out data difference using nokogiri in ruby? or there better way this?

you can use diff-lcs gem.

require 'diff/lcs' require 'open-uri' text1 = uri.parse('http://www.example.org/text1.txt').read text2 = uri.parse('http://www.example.org/text2.txt').read diff = diff::lcs.diff(text1, text2) 

unfortunately, declined provide example of output after several people asked it, can't more this.


Comments