in reply to Re: regex to replace linefeeds with <p> tags
in thread regex to replace linefeeds with <p> tags
to make the \r optional, instead of doing 2 passes over the data. (and I added a \n in the replacement to make the results look a little nicer in my eyes)s/(\r?\n){2,}/\n<\/p>\n<p>\n/g
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: regex to replace linefeeds with <p> tags
by throop (Chaplain) on Dec 25, 2006 at 22:56 UTC | |
by ysth (Canon) on Dec 25, 2006 at 23:51 UTC | |
|
Re^3: regex to replace linefeeds with <p> tags
by ysth (Canon) on Dec 25, 2006 at 23:43 UTC |