Since then, I’ve been looking into regular expressions quite a bit. One difficulty with the expression above is that multiple characters will be replaced with multiple hyphens, plus other punctuation will be ignored — they will simply be replaced with nothing. Another, perhaps more obvious difficulty is its complexity! A better approach would be the following:

where [[:alnum:]] is the POSIX character class for alphanumeric characters and [^[:alnum:]] is its negation. A third option, if you know your data has no underscores or want them to be preserved for some reason (and not transformed into hyphens) would be the following:

Odd that my lack of blogging does not seem to have affected traffic on this site! I posted in April of last year that the site had reached 1,000 page views from 400 unique visitors; that was over approximately 3 months of operation. In the (almost a full) year since then, there have been over 7,000 page views from 3,400-plus unique visitors, despite the fact that I have written exactly two blog posts in that time span (one of them yesterday):

Unsurprisingly, my most popular post — with 2,000 page views! — is still my ColdFusion Solr Tutorial, written in February 2012. Hopefully it is still relevant even with the release of ColdFusion 10. On the surprising side, my second most popular post is the aforementioned post about SHA hashing in Oracle 10g. I wish I could take even some credit for the content of that post but all I really did was bring the word of another developer (Jakub Wartak) to the attention of this blog’s readers. I wish I could say that my posts on SQL have been as warmly received!