How to remove \ n, \ t and spaces between lines in java?
str.replaceAll("\\s+", "");
\ s Simple character: [\ t \ n \ x0B \ f \ r]
java.util.regex.Pattern contains all predefined classes.
java.util.regex.Pattern
Use String.replaceAll with regex to remove all spaces:
s = s.replaceAll("\\s+", "");
Source: https://habr.com/ru/post/1737306/More articles:ActiveMQ - send a message to a specific consumer - activemqWhy does GetWindowThreadProcessId return 0 when called from a service? - c #How to print part of an HTML page? - htmlBest approach to storing image pixels in bottom-up order in Java - javaHow to fix basicHttpBinding in WCF when using multiple proxy clients? - httpJanRain PHP OpenID: how to check if AX provider supports programmatically? - phpTypical Hibernate Object Life Cycle in a Web Application -? - javaHow to make a class serializable without Serializable attibute in .net - jsonHow to create a floating (tooltip) control in Windows.Forms? - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1737311/dynamic-access-to-tables-from-another-database-inside-an-user-function&usg=ALkJrhiviRpjHb0CFWn9ROtFmP1XzKn0vgAll Articles