Thanks Thomas,

I will go with

\.v[0-9]+.*

which will give us a bit of flexibility and solve Dave's problem (I think!).

unless anyone strongly objects, of course.

Ian

Dr Ian McNicoll
mobile +44 (0)775 209 7859
office +44 (0)1536 414994
skype: ianmcnicoll
email: [email protected]
twitter: @ianmcnicoll

Co-Chair, openEHR Foundation [email protected]
Director, freshEHR Clinical Informatics Ltd.
Director, HANDIHealth CIC
Hon. Senior Research Associate, CHIME, UCL

On 22 July 2015 at 16:37, Thomas Beale <[email protected]>
wrote:

>
> Technically speaking, if we want to properly match any archetype in a
> slot, we need a regex that will match any level of versioning id. Since
> matched archetypes will eventually all have 3-part versions (but today
> might have only 1-part versions), we need to match thngs like
>
> .v0
> .v1
> .v0.0.1
> .v3.0.2
>
> and so on. So Diego's expression will do that. But Sebastian is correct -
> some of the matched archetypes could be test or research archetypes. So you
> need the remaining bit as well. You could in theory use:
>
> v[0-9]+(\.[0-9]+(\.[0-9]+((-rc|-alpha)(\.[0-9]+)?)?)?)?
> but I would say it is overkill (you only use regexes like that when you
> think there could be garbage version ids and you want to catch them and
> reject them). A reasonable balance is probably something like
>
> \.v[0-9]+.*
>
> which forces at least one digit of major version, and allows anything at
> all to come after, which is reasonable if we assume that no tools will
> create completely invalid version ids.
>
> For reference, there are some useful regexes here
> <https://github.com/openEHR/adl-tools/blob/master/libraries/openehr/src/am/archetype/archetype_hrid.e>
> .
>
> - thomas
>
> On 22/07/2015 15:26, Sebastian Garde wrote:
>
> My understanding was that minor version and patch version would not be
> part of the normal archetype id, which is what you are looking for here?
> Otherwise you'd need to allow "-alpha" etc here as well?
>
> Sebastian
>
>
>
> _______________________________________________
> openEHR-technical mailing list
> [email protected]
>
> http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org
>
_______________________________________________
openEHR-technical mailing list
[email protected]
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

Reply via email to