I found a patched from 2012-2013 definition of the archetypeNodeId type pattern.
Still need to investigate what was the initial problem at that time:
fix for archetypeNodeId () - see support_im.pdf 18.104.22.168 Archetype ID Syntax
perhaps this might be rejected eventually
final version can be checked at https://regex101.com/r/IX5KjF/5
Seems ok to me, it also supports other RMs that start with numbers
Just for the record, openEHR universally uses so-called Perl regex (PCRE), which is where the \d, \w etc etc comes from. So you can use that safely anywhere you like.
If we use PCREs, we can use this site to validate https://regex101.com/
Choosing multiline tag, many test cases, one per line, can be set on the test string box to verify the regex works on every desired case.
I have a new version of it: https://regex101.com/r/IX5KjF/3
I added support for -rc and -alpha in the version part but also for the namespace of hrid.
For the at-code part I also added support for 'id' prefixed ids - I'm not sure if this is needed for data instances.
The overall expression is optimistic (for instance versions like v000.000.000 are allowed)
Can some of you give me some feedback?
ps: to make these I consulted
I think this is fine. If we really want to disallow the v000 part maybe is just a matter of transforming the \d+ after the version into something like [1-9]*\d
But this probably makes the expression more difficult to read, so your current proposal is ok for me