I have been thinking about making a helper method that shortens internal links. For example:
if my website is example.com and a user posts a link to http://www.example.com/posts/80 it would be nice to shorten the link text to post#80 and http://www.example.com/comments/5 to comment#5.
would this suffice
url["http://www.example.com/posts/"] = "post#"
Or should I use a regex for this instead?
regexp!