In Reply to: Re: Automatic URL parsing in message body posted by James L on March 30, 2003 at 12:12:42:
It is trivial if the url reference is predictable and if it has a complete http beginning and is consistent. The problem is making it robust and dealing with correctly coded html, miscoded html and fixing urls without a complete http. I've tested the trivial Perl expression and it isn't as trivial as it seems. You really have to break the entire message into words and then conditionally parse each word depending on what comes before and after.Our search term highlight routine is a good example. It should be a simple one line search and replace. No cigar. It's over 60 lines of code and I was adding little fixes for over a month. URL fixing has far more little gotchas to deal with. If it was very limited and only dealt a limited number of codings, it might not be too nasty, but from experience, I'm sure even a simply version would end up needing several itterations to avoid miscoding under the right circumstances. You wouldn't believe the quirks we found in doing highlighting.
This post is made possible by the generous support of people like you and our sponsors:
Follow Ups
- Re: Automatic URL parsing in message body - Rod M 06:18:27 04/03/03 (0)