|laziness, impatience, and hubris|
replace url in text with html linkby thealienz1 (Pilgrim)
|on May 24, 2005 at 15:20 UTC||Need Help??|
thealienz1 has asked for the wisdom of the Perl Monks concerning the following question:
Before anyone says anything I have looked through the monastary looking for code that already does what the title describes. I know about here, which has been useful, but does not work under my circumstances.
Please hear me out first.
I have put assigned to put together an html version of a PDF document. Why? I do not know, but the PDF document is too comples to just directly save as html. Anyways, I have put the document together into html, but alot of the URLs that are written in the text are not html clickable links.
I have tried the solutions at here, but they yield results to be questioned. You see the URLs in the document are not directly formatted to any specification -- meaning they are directly written into a sentence as if it were a word.
Students can activate their UMSIS userids on-line by filling out and submitting the form at https://umsis.miami.edu/sign-up.
Do you noticed the period at the end? Well all the solutions that I have for convert http:// into links do not account for this problem. I am trying to account for grammatical puncutation that a URL might encounter, but have not been able to come with a solution.
I was wondering if the community had any insight? I have never been really good as regexp, so forgive my ingonorance if this really easy.
I just noticed also that the documents contain email address. In the same situation with http links with the whole being represented as a word not as a URL. If you can help with that... you would save me a lot of time. Considering the document if a few hundred pages.