correct missing regex variable declaration