function t.match(g)assert(t.string(g))return function(o)local B,u=t.string(o)if not B then return false,u end if string.match(o,g)==nil then return false,string.format("\037\113 \102\097\105\108\101\100 \116\111 \109\097\116\099\104 \112\097\116\116\101\114\110 \037\113",o,g)end return true end end

function t.match(pattern)
	assert(t.string(pattern))
	return function(value)
		local stringSuccess, stringErrMsg = t.string(value)
		if not stringSuccess then
			return false, stringErrMsg
		end

		if string.match(value, pattern) == nil then
			return false, string.format("%q failed to match pattern %q", value, pattern)
		end

		return true
	end
end
