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
In reply to Re^2: regex to replace linefeeds with <p> tags
by Joost
in thread regex to replace linefeeds with <p> tags
by jck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |