should be simple, but I'm going crazy with it.
Given a text like:
line number 1
line number 2
line number 2A
line number 3
line number 3A
line number 3B
line number 4
I need the Java regex that deletes the line terminators then the new line begin with space, so that the sample text above become:
line number 1
line number 2line number 2A
line number 3line number 3Aline number 3B
line number 4
"\r?\n\W+"
. I haven't tried it, so I don't want to register it as an answer. In case you haven't checked it out already, you can find some specifics about Java regex here: download.oracle.com/javase/6/docs/api/java/util/regex/… ... If you are guaranteed that "line" is the first text on a given line, you could also try"\r?\n[^l]+"
. – Aliform