|
以下のマクロで一応うまく置換しました。
while( 1 ) {
replaceallfast "(\\\\( *))((-|)([0-9]+))([0-9]{3})(?![0-9])"
, "\\1\\2,\\3", regular;
if( result == 0 ) break;
}
replaceallfast "(\\\\( )+)((-|)[0-9]+)", "\\\\\\2", regular;
replaceallfast "^\\\\(([0-9,]){10})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){9})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){8})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){7})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){6})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){5})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){4})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){3})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){2})( +)", "\\\\ \\1 ", regular;
replaceallfast "^\\\\(([0-9,]){1})( +)", "\\\\ \\1 ", regular;
gofiletop;
while(1) {
searchdown2 "(?<=^(.+))\\\\", regular;
if( !result ) {
break;
}
if( selecting ) escape;
if( x < 29 ) {
insert leftstr( " ", 29 - x );
}
}
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){10})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){9})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){8})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){7})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){6})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){5})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){4})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){3})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){2})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)(([0-9,]){1})(?![0-9,])"
, "\\\\ \\2", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){9})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){8})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){7})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){6})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){5})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){4})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){3})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){2})(?![0-9,])"
, "\\\\ -\\3", regular;
replaceallfast "(?<=^(.+))\\\\( *)-( *)(([0-9,]){1})(?![0-9,])"
, "\\\\ -\\3", regular;
endmacro;
|
|