티스토리 뷰

728x90
private static Column fixText(Column column) {
    return regexp_replace(
            regexp_replace(
                    regexp_replace(
                            column, "\\n", ""),
                    "\\r", ""),
            "\\u0001", "");
}


text
    .replace("\\n", "")
    .replace("\\r", "")
    .replace("\\u0001", "")

https://stackoverflow.com/questions/2163045/how-to-remove-line-breaks-from-a-file-in-java

 

How to remove line breaks from a file in Java?

How can I replace all line breaks from a string in Java in such a way that will work on Windows and Linux (ie no OS specific problems of carriage return/line feed/new line etc.)? I've tried (note

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[Pyspark] show all results  (0) 2021.01.08
[Regexp] ignore case sensitivity  (0) 2021.01.08
[Spark][SQL] GET_JSON_OBJECT  (0) 2021.01.08
[zeppelin] pyspark is not responding  (0) 2021.01.06
[JS] html onLoad not working  (0) 2021.01.04
댓글