per https://json-schema.org/understanding-json-schema/reference/regular_expressions
Use only standard escapes like \n, \r, \t and keep in mind that you also need to do JSON escaping.
we already do this here
|
"pattern": "^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*$", |
|
"pattern": "^urn:cdx:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[1-9][0-9]*#.+$", |
|
"pattern": "^([a-fA-F0-9]{32}|[a-fA-F0-9]{40}|[a-fA-F0-9]{64}|[a-fA-F0-9]{96}|[a-fA-F0-9]{128})$" |
|
"pattern": "^([a-z]{2})(-[A-Z]{2})?$", |
so character classes are not universal - some regex engines just dont support them.
we should take care of this , and use the custom character classes in these cases.
like [0-9] for \d
things to fix:
per https://json-schema.org/understanding-json-schema/reference/regular_expressions
we already do this here
specification/schema/2.0/model/cyclonedx-common-2.0.schema.json
Line 23 in 2a86067
specification/schema/2.0/model/cyclonedx-common-2.0.schema.json
Line 31 in 2a86067
specification/schema/2.0/model/cyclonedx-common-2.0.schema.json
Line 94 in 2a86067
specification/schema/2.0/model/cyclonedx-common-2.0.schema.json
Line 770 in 2a86067
so character classes are not universal - some regex engines just dont support them.
we should take care of this , and use the custom character classes in these cases.
like
[0-9]for\dthings to fix:
specification/schema/2.0/model/cyclonedx-common-2.0.schema.json
Line 495 in 2a86067