使用Notepad ++从多行中删除前导字符

时间:2012-10-23 15:28:36

标签: regex notepad++

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

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

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

不幸的是,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/

1 个答案:

答案 0 :(得分:2)

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

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

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

替换为:

\1
相关问题