使用十六进制查看器确定文本文件中结构化部分的定界符
我有一个包含结构化数据的文本文件。每个文本块之后都会显示“END”并继续到下一个块。看着十六进制查看器,我看到
0A:45:4E:44:0A:20:20:20:20:20:20:20:20:20
它转化为
?END?
注意 9 个空格。
如何在代码中将其写为分隔符?
"END\n\n\n \n \n \n \n \n \n"
这似乎不起作用。我缺少什么?
I have a text file with structured data. After each text block it says "END" and continues onto the next block. Looking at a hex viewer I see
0A:45:4E:44:0A:20:20:20:20:20:20:20:20:20
which translates into
?END?
Notice the 9 spaces.
How do I write this as a delimeter in my code?
"END\n\n\n \n \n \n \n \n \n"
This doesn't seem to work. What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
然而,
您很可能忘记提及您正在使用哪种语言。 up 是从哪里得到这些额外的
\n
的?Most likely,
however you forgot to mention which language you're using. Where did up get all those extra
\n
s from?