Making regex case insensitive; small bug in variable name.