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.
For example:
Students can activate their UMSIS userids on-line by filling out and submitting the form at https://umsis.miami.edu/sign-up.
...which can be obtained via the web at http://www.miami.edu/it-forms/.
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.
Thank you
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: replace url in text with html link
by davidrw (Prior) on May 24, 2005 at 15:33 UTC | |
|
Re: replace url in text with html link
by ides (Deacon) on May 24, 2005 at 15:29 UTC | |
|
Re: replace url in text with html link
by Roger (Parson) on May 24, 2005 at 15:40 UTC | |
by davidrw (Prior) on May 24, 2005 at 16:27 UTC | |
|
Re: replace url in text with html link
by thealienz1 (Pilgrim) on May 24, 2005 at 16:03 UTC | |
|
Re: replace url in text with html link
by TedPride (Priest) on May 24, 2005 at 16:30 UTC | |
|
Re: replace url in text with html link
by PodMaster (Abbot) on May 25, 2005 at 11:26 UTC | |
by thealienz1 (Pilgrim) on May 26, 2005 at 18:54 UTC | |
by PodMaster (Abbot) on May 26, 2005 at 19:52 UTC |