Fixing `regex.valid()`