regex - \r\n in scala parser for Windows/Unix -
this question has answer here:
- new line character in scala 6 answers
i've got scala regex test parse string multiple lines. looks following:
val s = "this 1 line\r\n" + "the second line\r\n" + "third"
scala test "\r\n" working windows, unix should keep "\n". common solution work on both systems?
you test \r?\n
instead of \r\n
. way carriage return optional.
Comments
Post a Comment