"Line1\nLine2\nLine3..."
文字列内のすべての行 ( ) をチェックし、重複行がある場合は 1 つだけ残して br タグを無視するJavaScript でスクリプトを作成する方法は?
var s = "Hello world\n<BR>\nThis is some text\nThis is some text\n<BR>\nThis is some text"
line1 = "Hello world"
line2 = "<BR>"
line3 = "This is some text"
line4 = "This is some text"
line5 = "<BR>"
line6 = "This is some text"
var result = "Hello world\n<BR>\nThis is some text\n<BR>"
line 1 = "Hello world"
line 2 = "<BR>"
line 3 = "This is some text"
line 4 = "<BR>"