Re: TMCL Regexp constraint
Lars Marius Garshol <[email protected]>
| Newsgroups | gmane.text.xml.xtm.general |
|---|---|
| Message-ID | <[email protected]> |
* Robert Cerny > > I am wondering how the TMCL Regular Expression constraint [1] should be applied: > > a. the boundaries are implicit > b. the boundaries are explicit > > E.g. i want all lower case characters in my string: > > Should the value of the respective occurrence of the topic that represents my regexp constraint be: > a. [a-z]+ > b. ^[a-z]+$ Very good question. Unfortunately, the answer to your question has been well hidden. What it means to match a regular expression is defined here: http://www.isotopicmaps.org/tmcl/tmcl.html#d0e539 Following the links you get to: http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs which says: > Unlike some popular regular expression languages (including those defined by Perl and standard Unix utilities), the regular expression language defined here implicitly anchors all regular expressions at the head and tail, as the most common use of regular expressions in ·pattern· is to match entire literals. So the answer to your question is (b), which IMHO is as it should be. --Lars M. http://www.garshol.priv.no/tmphoto/ http://www.garshol.priv.no/blog/