Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
ECMAScript (JavaScript)

/
(\n|\\n)(?!$)
/
g

Description

Replace non-ending string \n by the <br /> HTML tag

Submitted by anonymous - 11 years ago