Auto-Linking Comments

June 24, 2005

To avoid comment spam, my blog comments are displayed as plain text. However urls to other entries on my blog are often posted to in the comments. So I wrote a simple regular expression to create hyperlinks out of them:

	"<a href=""\1"">\1</a>", 

If you want this to work with or without the www you can use something like this for the regular expression:


Like this? Follow me ↯

You might also like:

11 people found this page useful, what do you think?


now that's pretty damn useful! thx for post it :) [OT] you wouldnt happen to know how they have and can display the content in different languages over at MXNA, would ya?
Thanks... I think the other languages on MXNA are blogs that are actually written in those languages. I could be mistaken perhaps Christain Cantrell or Mike Chambers will read this and can comment further.
BTW if you find an entry to be useful (or not useful) please use my rating system at the bottom of the post. Then I can construct which posts are most useful, and which are not. See for a list of most useful posts so far. (ooh that should auto-link)
how do you leave comments on all your friends on your friends list on myspace,any help? email me about it
hey, i heard there was an auto comment bot, if anyone knows of this bot please let me know
yeah the comment bot what up with it. I know someone has one.
i would love an email also with that auto post bot info as well.

Foundeo Inc.