regular expression to replace \n with <br>
From: pat (wmrpbhhapzlm_at_spammotel.com)
Date: 10/20/04
- Previous message: Sven: "preg_replace with "eval"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Oct 2004 09:44:38 -0700
I want a Regular expression that replaces any new line with the HTML
<br> tag, but only if and only if the new line does not already
contain any tags (e.g. <tr>)
The following won't do, as it will add a <br> tag to new lines which
already have another HTML tag!
objLineFeedRegExp = new RegExp("\n", "gi");
strBody =
strBody.replace(objLineFeedRegExp,"<br>")
- Previous message: Sven: "preg_replace with "eval"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]