Fix evaluation of regex