I have a page where people can submit data. I've told it to look for and URL and replace it with a link to that adress. I've also told it to force a wordwrap ("\n") at a specific width, because the page where the text is shown simply is depended on a specific width.
This could result in an URL being cut in half.
Now I'm trying to, after the wordwrap, to look for URL:s in the message and remove all linefeeds in it. But only in the HREF="url" part.
Any suggestions on how I can do this?