如何使用Perl的正則表達式搜索找到文件結尾:Perl的正則表達式匹配<foo> EOF
-------\r\n<eof>
16進製表示是:
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