Build failing when trying to implement regex