【发布时间】:2012-12-20 02:01:29
【问题描述】:
如何使用 Perl 正则表达式搜索来查找以以下结尾的文件:
-------\r\n<eof>
十六进制是:
2D 2D 2D 2D 0D 0A (the end of the file)
我在 UltraEdit 中,它说它使用 Boost Perl 正则表达式语法。
我已经想通了可以使用:
----\x0d\x0a
它确实找到了我想要的行,但仅在数百个不在文件末尾的行中:
whatever
------------ <- matches this also, which I don't want!
whatever
------------ <- matches this also, which I don't want!
whatever
【问题讨论】: