http://www.codehouse.com/javascript/tips/string_multiline/
http://www.regular-expressions.info/reference.html

Use Notepad++ to replace "\r" to "\\n\\\r" of desired contents by "Extended" model in Find Replace dialog.
Eg.

Assign

A(CR)(LF)
B(CR)(LF)
C(CR)(LF)
D

to variable XYZ.

First, replace "\r" to "\\n\\\r"

A\n\(CR)(LF)
B\n\(CR)(LF)
C\n\(CR)(LF)
D

In addition, put above result into XYZ; for instance,

var XYZ = "A\n\(CR)(LF)
B\n\(CR)(LF)
C\n\(CR)(LF)
D";
arrow
arrow
    全站熱搜

    wenching520 發表在 痞客邦 留言(0) 人氣()