#! ruby -Ku require "kconv" def check(str) if /<(div|span)>.*?<\/\1>/ =~ str then print(Kconv.tosjis("○") + str + "\n") else print(Kconv.tosjis("×") + str + "\n") end end print(Kconv.tosjis("<(div|span)>.*\\1> にマッチするかどうか\n\n")) check("Today is