scanning for links

Have you looked at the auto_link Rails helper method?