将 Netbeans 编辑器中的数字替换为递增数字
我在 Netbeans 6.1 编辑器中有一些代码,看起来像这样
fooString(8)
fooString(8)
fooString(8)
fooString(8)
foostring2(8)
foostring3(8)
foostring4(8)
foostring5(8)
foostring6(8)
foostring7(8)
foostring7(9)
foostring7(10)
foostring7(11)
foostring7(12)
我想将其转换为 fooString(1)
fooString(2)
fooString(3)
fooString(4)
foostring2(5)
foostring3(6)
foostring4(7)
foostring5(8)
foostring6(9)
foostring7(10)
foostring7(11)
foostring7(12)
foostring7(13)
foostring7(14)
有没有办法,例如使用正则表达式或其他任何东西来完成这项工作?
谢谢
I have some code in Netbeans 6.1 editor that looks like this
fooString(8)
fooString(8)
fooString(8)
fooString(8)
foostring2(8)
foostring3(8)
foostring4(8)
foostring5(8)
foostring6(8)
foostring7(8)
foostring7(9)
foostring7(10)
foostring7(11)
foostring7(12)
and i want to convert it to
fooString(1)
fooString(2)
fooString(3)
fooString(4)
foostring2(5)
foostring3(6)
foostring4(7)
foostring5(8)
foostring6(9)
foostring7(10)
foostring7(11)
foostring7(12)
foostring7(13)
foostring7(14)
Is there a way e.g with regular expresions or anything else to do the job?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想以编程方式执行此操作吗? 如果没有,那么我会执行以下操作:
将其复制到 Excel 工作表。 该选项卡会将数字排列在单独的列中,即 Excel 看起来像这样。
<前><代码> ABC
foostring(8)
foostring1( 8 )
foostring2( 8 )
等
现在
复制回 netbeans 编辑器并删除在步骤 1 中插入的选项卡。
Do you want to do this programmatically? If not, then I'd do the following
Copy this to an Excel sheet. The tab would arrange the numbers in a separate column i.e. excel will look something like this.
etc.
Now change the values in column B. Just type 1 and 2 in the first 2 rows and drag down to fill the rset of rows.
Copy back to netbeans editor and remove the tabs inserted in step 1.