| 
			|  | tackさん、こんにちは。
 
 > searchdown2 "(?<!\\d)\\d+$", regular,inselect;
 > ↑の行は何を[0-9]から始まらず、[0-9]が続くものを検索しているということでし
 >ょうか?
 
 そういうことです。
 
 > //message $p[#i];
 > ↑のメッセージはどういった意味を持つのでしょうか?
 
 コメントアウトしているので、実際は働きませんが配列$p[#i]の中身を調べられるよ
 うにつけてあります。
 show bg 0925_h_21
 show bg 0925_h_44
 show bg 0925_h_32
 の場合だと配列$p[#i]=[21,44,32]となります。
 (?<!\\d)を付けない場合だと配列$p[#i]=[21,1,44,4,32,2]となってしまい失敗しま
 した。
 
 修正版
 
 setcompatiblemode 0x00020000;
 begingroupundo;gofiletop;
 #i=0;#j=0;
 while(1){
 searchdown2 "show .*_h_\\d+",regular;
 searchdown2 "(?<!\\d)\\d+$",regular,inselect;
 if(!result) break;
 $p[#i]=gettext(foundtopx,foundtopy,foundendx,foundendy);
 #i=#i+1;}
 gofiletop;
 setsearch "image [^$]+" , 0x4003819;
 while(#j<#i){
 finddown2;
 $q[#j]=gettext(foundtopx,foundtopy,foundendx,foundendy);
 #px[#j]=foundtopx;#py[#j]=foundtopy;#dx[#j]=foundendx;#dy[#j]=foundendy;
 #j=#j+1;}
 #j=0;
 while(#j<#i){
 moveto #px[#j],#py[#j];beginsel;moveto #dx[#j],#dy[#j];
 replaceall "_h_\\d+","_h_"+$p[#j],regular,inselect2;
 #j=#j+1;}
 endgroupundo;
 
 
 
 | 
 |