post

RegExp's – just like Marmite

Regular expressions are not everyone’s cup of tea. I recently started using a plugin for WordPress called Download Counter Advanced, and it works great for my Battrick stuff. I wanted an easy way to add in the date so that I could put “…downloads since…” and have the date automatically insert, all marked up correctly.

I hacked the plugin code, and managed this, and out of courtesy, sent the code to Andy Staines, the author of the plugin, via his contact form. This was his reply (emphasis mine):

Ah… um… thanks!

The shocking truth is that I don’t read regexp’s! I read that chapter three times and quickly concluded that I would prefer to gently flay myself with an old dressing gown while standing naked in the snow than try to follow the rules.

My son helps me out here who is known as a RegExp king. So can you confirm what your random sequence of numbers and letters below actually does in detail as it always looks to me like it was typed by a monkey swaying gently under the influence of Prozac…

It doesn’t help that I have had only about four hours sleep only to be rudely awoken by a barking dog. So I am not thinking clearly yet. So – you pass in the data row of the download? And get back the start date?

Andy

post

Review: hReview WordPress Plugin

hreview-screenshot-writing

In a previous post, I’d mentioned that I’d installed the hReview plugin, but then deactiviated it due to “problems”. A comment from the author of the plugin, Andrew Scott, asked what those problems might be, and I realised that I simply hadn’t given the plugin a fair go before dismissing it. Below is my review of hReview (marked up as a microformat *using* hReview, naturally), though my styling could do with a tweak.

Read my review of this plugin