Regular Expressions For New Line

Category: Strings | Views Total: 186 views

A regular expression to match a new line (linebreaks).

Note that Linux uses \n for a new-line, Windows \r\n, and old Macs \r.


The regex above also matches multiple consecutive new lines. Use the following regex to fix that:


Rate This Regex
User Review
0 (0 votes)

Leave a Reply