سؤال

I've got a simple PDF file in Hex dump format, lines looking like this:

00000000:  25  50  44  46  2d  31  2e  34  0d  0a  25  e2  e3  cf  d3  0d  %PDF-1.4..%.....
00000010:  0a  31  20  30  20  6f  62  6a  0d  0a  3c  3c  20  2f  46  69  .1 0 obj..<< /Fi
00000020:  6c  74  65  72  20  2f  46  6c  61  74  65  44  65  63  6f  64  lter /FlateDecod
00000030:  65  20  2f  4c  65  6e  67  74  68  20  31  38  34  30  36  20  e /Length 18406 
00000040:  3e  3e  0d  0a  73  74  72  65  61  6d  0d  0a  2b  2c  9c  77  >>..stream..+,.w

How can I clean up the file so I'm left with the Hex values only? I'm guessing regular expressions but I fail to apply it successfully in an editor. Am running on a Windows machine.

هل كانت مفيدة؟

المحلول

Notepad++

Ctrl+F -> Replace - Tick Regular Expression in the bottom left

Find: ^(.{73}).*$

Replace With: \1

Or Alt+Drag for column selection & copy/pasta.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top