String filename = "abc.def.ghi"; String start = StringUtils.substringBefore(filename, "."); // returns "abc"