split a string on multiple spaces java code example Example: split funtion in string on multiple spaces String[] sArray = s.split("\\s{2,}");