#!/usr/bin/ruby File.open(ARGV[0], "r") do |infile| infile.each_line do |line| # / line md = /(.*)\"(.*)\"(.*)/.match(line) if md mid = md[2] mid.gsub!(/ ([a-z])([a-z]*)/) { " " + $1.upcase + $2 } line = md[1] + '"' + mid + '"' + md[3] end puts line end end
No comments:
Post a Comment