The pattern keyword applies a regex to string values.
{"type": "string", "pattern": "^[a-z0-9-]+$"}
Use pattern for slugs, identifiers and restricted text formats.