Re: Regex in Archetypes must include TYPE
Adam Flinton wrote: >> >> No need to do that, Adam, just wrap the regex within parentheses. So >> taking >> the example you gave, the correctly-wrapped regex would be: >> >> Include entries >> openEHR-EHR-CLUSTER\.(checklist_item-general-cvs1.v1|checklist_item-general-cvs2.v1|checklist_item-general-cvs3.v2|checklist_item-general-cvs4.v2draft|checklist_item-general.v1|checklist_item-general.v2|checklist_item-general.v3) >> >> The code to generate this is trivial in any programming language >> (assuming >> your programming language has the ability to concatenate strings, >> which I >> reckon is a safe bet). Unless you're programming in assembly >> language, it's >> probably one simple line of code. >> >> >> > Hum. > > I agree that that would work but it's still wrong in principle IMHO > i.e. > then the regex is still a pseudo/meta regex i.e. it requires > processing > to turn it into a valid regex. > > This would have to be duplicated in all the different implementations > etc.etc. > > *All, I also agree with Adam. A regex should be able to be used over a population of strings (identifiers in this case) and have the effect of filtering out what you want. Having to put the regex together first is inviting problems - some implementations will forget, others will do it wrongly, the specifications of how to do it will change.... Practically speaking this does not change the specifications, but I suspect we should put some guidance in to the effect that regexes based on full identifiers should be used in archetype slots. - thomas * _______________________________________________ openEHR-technical mailing list openEHR-technical@openehr.org http://lists.chime.ucl.ac.uk/mailman/listinfo/openehr-technical