正则表达式记事本在每一行中递增数字 [英] Regular Expression Notepad increment numbers in every line
问题描述
我必须使用 Notepad++ 在每一行的开头递增地添加数字.这不是开始.但是,喜欢
I've to add numbers incrementally in the beginning of every line using Notepad++. It is the not the very beginning. But, like
when ID = '1' then data
when ID = '2' then data
when ID = '3' then data
.
.
.
.
when ID = '700' then
有什么方法可以通过替换任何表达式来增加这些数字,或者是否有任何内置的记事本功能可以这样做.
Is there any way i can increment these numbers by replacing with any expression or is there any inbuilt-notepad functions to do so.
谢谢
推荐答案
如果你想用 notepad++ 做到这一点,你可以通过以下方式来做到.
If you want to do this with notepad++ you can do it in the following way.
首先,您可以使用模板文本编写所有 700 行(您可以使用宏或使用编辑 -> 列编辑器).写好后,将光标放在你想要数字的地方,点击Shift
+Alt
并选择所有行:
First you can write all the 700 lines with template text (you can use a Macro or use the Edit -> Column Editor). Once you have written it, put the cursor on the place you want the number, click Shift
+Alt
and select all the lines:
这篇关于正则表达式记事本在每一行中递增数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!