Creating a regex pattern to match "string/uuid" pattern

Viewed 7249

A string like this would match:

"test/00b46e01-3994-4ac2-939e-2d5052a65961"

Or like this

"anotherword/58628d3f-becf-4f54-bdea-336ca9247145"

The regex for uuid (v4) I have is "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" for my JSON schema (i.e. my JSON object holds a uuid property), but now I want to incorporate the 'string/' in front of this pattern as well.

1 Answers
Related