06/05/03 22:55:57
>>771 おおっありがとう。
function! CountPeriod( period )
let s:check_sum = 0
let s:period_sum = 0
bufdo call s:DoCounts( a:period )
echo a:period "以降のファイルは" s:period_sum "個でした。"
echo "チェックしたファイル数 "s:check_sum
endfunction
function! s:DoCounts( period )
g/DT\[\d\{4}[0-9\-,]*\]/call s:Counts( a:period )
endfunction
function! s:Counts( period )
let s:check_sum = s:check_sum + 1
let year = matchstr(getline('.'), 'DT\[\zs\d\{4}\ze[0-9\-,]*\]')
if year >= a:period
let s:period_sum = s:period_sum + 1
endif
endfunction
こんな感じで思っていた事ができました。