Regex split newlines keep captured line break characters at end of match

后端 未结 0 1426
悲哀的现实
悲哀的现实 2020-12-09 23:28

I need to split a text into its lines. But I also need to keep the line break characters at each line.

var text = "abc\\r\\ndef";  // should be two          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题