findKeysize and get substring