From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript RegExp Object
The \n character is used to find a newline character.
\n returns the position where the newline character was found. If no match is found, it returns -1.
|
new RegExp("\n") or simply: /\n/ |
ExampleSearch for a newline character in a string:
The marked text below shows where the expression gets a match:
Try it yourself » |
JavaScript RegExp Object
From http://www.w3schools.com (Copyright Refsnes Data)