Allow attributes to be validated against regexes using hashref(s)

Here is the new patch using hashref(s) instead of arrayrefs. Please could you adjust the Pod as necessary.