添加字符后记事本++

时间:2013-12-21 19:03:44

标签: regex notepad++

我想在12个字符后添加字符“e”。像这样的东西:

theworldwillndsoon

应该是这样的:

theworldwillendsoon

我怎么能在notepad ++中做到这一点?

2 个答案:

答案 0 :(得分:2)

您可以点击Search - > Replace,选中搜索模式下的正则表达式复选框。

Find: ^(.{12})
Replace: \1e

注意:点.匹配任何单个字符(换行除外),\1是对捕获组的引用()

答案 1 :(得分:1)

也许这会在12之后插入什么?

找到:

(?<=^.{12})

替换为:

e

使用lookbehind

在替换标签中&gt;搜索模式: 必须检查正则表达式的选项。

相关问题