Java String Clean cleanText(String t)

Here you can find the source of cleanText(String t)

Description

clean Text

License

Apache License

Declaration

private static String cleanText(String t) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static String cleanText(String t) {
        t = t.replaceAll("(,|:|;)", " ");
        t = t.replaceAll("  ", " ");
        t = t.replaceAll("\\n", " ");
        t = t.replaceAll("([\\.]\\s)", ".1. .0. ");
        t = t.replaceAll("  ", " ");
        t = t.replaceAll("   ", " ");
        t = t.trim();//from   w  w w .  ja v  a  2s  . c o  m

        return t;
    }
}

Related

  1. cleanStringForJavaName(String original)
  2. cleanStringFromWhitespaces(String text)
  3. cleanText(final String input)
  4. cleanText(String s)
  5. cleanText(String s)
  6. cleanText(String text)
  7. cleanText(String text)
  8. cleanText(String text)
  9. cleanText(String text)