Improves regex validations