def concat_litstrs(s) i=0; str="" while i=s.index(RE_LITSTR,i) i+=$1.size str<<$2 end return str end
msgs=[] Dir.chdir WORKDIR; files = Dir.glob(FILES) for f in files lines=File.readlines(f,nil)[0] lines.gsub! RE_C_CMT,"" lines.gsub! RE_CPP_CMT,"" i=0; while i=lines.index(RE_MYMSGBOX,i) msgs.push $3.strip i+=$1.size end msgs.uniq! end for m in msgs.sort! print m,"\n" end