Java tutorial
//package com.java2s; /******************************************************************************* * Copyright Duke Comprehensive Cancer Center and SemanticBits * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/c3pr/LICENSE.txt for details. ******************************************************************************/ public class Main { private static String normalize(String s) { return s.replaceAll("\\s+", " "); } }