Hi all,
I've got a varchar() field in SQL Server that has some carriage return/linefeeds between paragraph marks.
I'd like to turn it into properly formatted HTML.
For instance:
---------- before ----------
The quick brown fox jumped over the lazy dog. Then he got bored and went to bed. After that, he played with his friends.
The next day, he and his friends had a big party.
---------- after -----------
<p>The quick brown fox jumped over the lazy dog. Then he got bored and went to bed. After that, he played with his friends.</p>
<p>The next day, he and his friends had a big party.</p>
What's the right way to do this? Obviously regular expressions would be a good way to go, but I can't figure out how to trap the beginning of field along with the crlf (carriage return/linefeed) combo in a sane way.
Any regex geniuses out there? Would love some help. Thanks if so!