str.gsub(/¥¥u((?:[¥da-f]{2}){1,6})/) { [ $1.hex ].pack('U') }