Fix warning due to improper declaration of regex()