[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: regex in the spec
i was looking at the regular expressions during the f2f and wanted to toss out some thoughts on it after looking into it a bit more. first, in the spec we don't really say much in terms of regular expression conformance and that kinda worries me. i am thinking that maybe we should call out a generally accepted flavor of regex, then pare it down as (if) necessary for our spec. second, i was looking at the expressions themselves and am a little confused--because, i think, the current verbage uses *perl* regex and i was thinking that we would be using *posix* regex, specifically 'POSIX 1003.2' flavored expressions--by this: <xs:pattern value="(\d+\.)*\d+"/> i assume that we want to cover this: 1 1.1 1.2.3 1123.2386576.93783636.736235252 ... using posix regex i would write this as: <xs:pattern value= "[0-9]+(\.([0-9])+)*" /> besides the syntactical difference i would move the literal '.' to the predicate so that '1.' isn't valid ;o) as to "Simple type VersionMatchType": <xs:pattern value="((\d+|\*)\.)*(\d+|\*|\+)"/> if the idea here is to simply include a direct regular expressions i suggest using the same: <xs:pattern value= "[0-9]+(\.([0-9])+)*" /> going this route ensures that just about any language that operates on regular expressions will support the syntax and that there is a tangible reference point for the semantics. thoughts? b
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]