gsubメソッドを使って、やってみました。他にも方法はありそうです。 CYG~/tmp% cat test_gsub_url.rb print "=" * 75, "\n変換前\n", "=" * 75, "\n" , ARGV[0] , "\n" str = ARGV[0].gsub(/(https?\:[\w\.\~\-\/\?\&\+\=\:\@\%\;\#\%]+)/){|x| "<a href='#{x}>#{x}<\/a>" } print "\n返還後\n", '-' * 75 , "\n", str , "\n" CYG~/tmp% ruby test_gsub_url.rb "abc日本語の http://yahoo.ne.jp efg https://google.ne.jp W EBサイト" ======================================