regex - \r\n in scala parser for Windows/Unix -


this question has answer here:

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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - How can I echo out this array? -

javascript - IE11 incompatibility with jQuery's 'readonly'? -