How to remove the \n, \t and spaces between the Strings in Java November 17, 2014 Get link Facebook Twitter Pinterest Email Other Apps This can be achieved by using the Regular Expressions. String sText = "\n Test \t\n"; sText= sText.replaceAll("\\s+", ""); Comments
Comments