regexp code probably does not play well with ==