简体   繁体   English

Sublime Regex搜索和增量

[英]Sublime Regex Search and Increment

I would like to know if its possible, to select all the numerics inside each square brackets ie; 我想知道是否可以选择每个方括号内的所有数字,即;

myarray[1]

I would like to select all numerics inside all arrays in a page (Sublime); 我想选择页面中所有数组内的所有数字(崇高); and then increment them using insertNums or something else. 然后使用insertNums或其他方法递增它们。 - The incrementation need to increment after each 2. so 0 0, 1 1, 2 2, etc should be the outcome. -增量需要在每2之后递增。因此,结果应为0 0、1 1、2 2等。

If anyone is kind enough to help, thanks. 如果有人愿意帮助您,谢谢。 :) :)

hope you are looking for this : 希望你正在寻找这个:

(\d+)(?=[^\[]*(?=\]|$))

demo here : http://regex101.com/r/kU4lY1/2 演示在这里: http : //regex101.com/r/kU4lY1/2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM