in reply to Re^2: regex to replace linefeeds with <p> tags
in thread regex to replace linefeeds with <p> tags
throopforeach my field (qw(postby title teaser content)){ $in{$field} =~ s[ (\r? \n){2,} ] # two or more CR [ \n </p> \n <p> \n]gx; # Close one para, open ano +ther }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: regex to replace linefeeds with <p> tags
by ysth (Canon) on Dec 25, 2006 at 23:51 UTC |