Correct OBJECT_REF regex

Description

See https://specifications.openehr.org/releases/BASE/latest/base_types.html#_object_ref_class
a string matching the regex [a-zA-Z][a-zA-Z0-9_-:/&+?]*

The given regex pattern appears to be wrong, at least its format. IntelliJ (maybe it is the SonarLint plugin) and some other tool (https://www.regextester.com/) are giving me an error when using [a-zA-Z][a-zA-Z0-9_:/&+?]* as pattern. It says the _: part is parsed as a range, while having a wrong range (_ to : is not working because of their order).

Is this meant to mean “… or _ or , or : or …”? Then I would simply propose to change the pattern to: [a-zA-Z][a-zA-Z0-9-_:/&+?]*. This pattern goes through both tools without an error.

Reporter

Thomas Beale

Raised By

Jake Smolka

Components

Affects versions

Configure