question: public static String cleanText ( String text ) { String plainText = text ; plainText = plainText . replaceAll ( "<.+?>" , " " ) ; plainText = plainText . replaceAll ( "__.+?__" , " " ) ; plainText = plainText . replaceAll ( "\\[http.+?\\]" , " " ) ; plainText = plainText . replaceAll ( "\\{\\|.+?\\|\\}" , " " ) ; plainText = plainText . replaceAll ( "\\{\\{.+?\\}\\}" , " " ) ; plainText = plainText . replaceAll ( " - " , " " ) ; plainText = plainText . replace ( '"' , ' ' ) ; plainText = plainText . replace ( '\'' , ' ' ) ; plainText = plainText . replace ( '[' , ' ' ) ; plainText = plainText . replace ( ']' , ' ' ) ; plainText = plainText . replace ( '=' , ' ' ) ; plainText = plainText . replace ( '*' , ' ' ) ; plainText = plainText . replace ( '|' , ' ' ) ; plainText = plainText . replace ( ':' , ' ' ) ; plainText = plainText . replace ( '{' , ' ' ) ; plainText = plainText . replace ( '}' , ' ' ) ; plainText = plainText . replace ( '(' , ' ' ) ; plainText = plainText . replace ( ')' , ' ' ) ; plainText = plainText . replaceAll ( "\\s{2,}" , " " ) ; return plainText ; }
target:  Clean a string from left-over WikiMarkup (most parsers do not work 100% correct).