local number_cut = 12 local second_one = [[ 1283813122344 12 12838138931316 128381383131 ]] local match0 = string.match(second_one, "%f[%w_]" .. number_cut .. "%f[^%w_]") if (match0) then print "this is exactly matched 12" else print "not matching" end