• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

compare contents of two files using regex

 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Could anyone give me some hint, as to how i can compare two files which are contain lines using the following encoding schemes:


US-ASCII
ISO-8859-1
UTF-8 Eight-bit
UTF-16BE Sixteen-bit
UTF-16LE Sixteen-bit
UTF-16 Sixteen-bit UCS


Let me know if further information is required.
I would appreciate ANY hint/help

Thanks,
-Kamal.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by compare - do you want to know which lines are added or omitted from one or the other file (in which case one of the numerous "diff"-like tools would do the trick), or do you need to compare the contents of individual lines as well?
 
Kamal Ahmed
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
need to compare the contents of individual lines , one example of a line is:

WEBMETHODS: localhost ort - (WEBMETHODS.DEFAULT.TestComponentId.TestSubcomponentId) [TestComponentId.TestSubcomponentId.?] 2006-08-08 18:15:56.169 EDT INFO: ?


I could not paste the UTF-16 format here
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, so say you have two lines that look just about like the one you posted - what should be the desired output? Would those two lines you're comparing be in the same file, or in different files?
 
reply
    Bookmark Topic Watch Topic
  • New Topic