Prev / Next / あかぴのChangeLog by rchalow

今日のruby[rubyの勉強][chalow-rb]

2006-07-19

今日のruby [rubyの勉強][chalow-rb]

#!/usr/local/bin/ruby
$KCODE="EUC"
# $pat = /#{ARGV.shift}/
while line = ARGF.gets
#   if $_ =~ $pat
#      # マッチした部分の前後にエスケープシーケンスを埋め込む
#      line.gsub! $pat, "#{st}\\&#{en}"
#      line.gsub(/#/,"#")
#      print "\t\t\t\t###",line                               # (TAB)(TAB)(TAB)###各行
#      print "  ",line.sub(/(?:\r|\r\n|\n)\z/, ""),", ,\r\n"   # __(改行文字削除した行),_,改行
#      print line.gsub(/#/,"#")
#      print line.gsub(/,/,"[かんま]")
      print line.gsub(/\t/,"        ")                       # TABを空白8文字に変換
#   end
end

blog comments powered by Disqus