Apparently json schema doesn't like this regex: ^(?=.{1,63}$)([-a-z0-9]*[a-z0-9])?$
https://regex101.com/r/qsyUoQ/1
I get an error: pattern must be a valid regex. This error means the regex pattern I'm using is invalid according to json schema.
My regex seems to be valid for most other parsers though. and json schema supports positive and negative look aheads and capture groups: https://json-schema.org/understanding-json-schema/reference/regular_expressions.html
Is there some json schema specific escaping I need to do with my pattern?
I'm at a loss to see what it doesn't like about my regex.
The regex I want will do the following:
- Allow lower case chars, numbers and "-"
- Can start with but not end with "-"
- Max length of string cannot exceed 63 chars
^[-a-z0-9]{0,62}[a-z0-9]$regex101.com/r/LCsubB/1