用Replace Pioneer来统计三位数字其中两位数字组合次数
1个回答

这需要用Replace Pioneer写一些代码,步骤如下:

1.ctrl-o打开文件

2.ctrl-h打开replace窗口

* replace unit选择Line

* 点击Advanced页,在run following at the beginning of replace输入clear_values_all()

* 在run following for each matched unit输入

if ($match[1]=~/d/) {

set_value($match[1].$match[2],get_value($match[1].$match[2])+1);

set_value($match[1].$match[3],get_value($match[1].$match[3])+1);

set_value($match[2].$match[3],get_value($match[2].$match[3])+1);

}

* 在insert end text输入get_values_all()

3.点击replace,完成.

4.ctrl-s存盘.