Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Replace \n by <br />
Open Workspace
JavaScript
Substitution
Created 2014-03-27 08:56
2
Regular Expression
/
(
\n
|
\\
n
)(?!
$
)
/
g
Description
Replace non-ending string \n by the HTML tag
Submitted by
Anonymous