#! ruby -Ku require "kconv" def check(str) if /color is (red|green)/i =~ str then print(Kconv.tosjis("○") + str + "(" + $& + ")\n") else print(Kconv.tosjis("×") + str + "\n") end end print(Kconv.tosjis("/color is (red|green)/i にマッチするかどうか\n\n")) check("Border color is Red") check("Frame Color is GREEN") check("Background Color Is green")