2

我有 299516 行的 txt 文件 - 不要问为什么!

我需要从每行中删除所有 110 个前导字符,保存接下来的 5 个字符并删除该行的其余部分。

我可以用英文版的“MID()”在 EXCEL 中完成。

不幸的是,Notepad++ 不支持像 ^ 这样的重复计数。{27}

提示:

http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Regular_Expressions

http://blog.creativeitp.com/posts-and-articles/editors/understanding-regex-with-notepad/

4

1 回答 1

2

实际上,从版本 6 开始就可以了(以前使用的旧正则表达式库已替换为 PCRE)。这些文章现在已经过时了。

使用最新版本的 Notepad++,找到:

^.{110}(.{5}).*$

用。。。来代替:

\1
于 2012-10-23T15:29:54.783 回答