Made changes following feedback on Basho, in particular moving regular expression check into the index_key_in_range function