W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

schema pattern matching (negate)

From: Colin Mackenzie <colin@elecmc.com>
Date: Tue, 1 Jul 2003 10:10:20 +0100
To: <xmlschema-dev@w3.org>
Message-ID: <PJEOKNCGPHICMMDPMNAJEEKDCHAA.colin@elecmc.com>
Hi,

I am trying to answer a post from the comp.text.xml newsgroup.

question asked how to negate strings in XSD pattern matching regular
expressions

I answerd to use caret ^

e.g.
[^S]

but what is required is that pattern does not begin with a whole string e.g.
"STR1234" and "STRxccc" are bad (because of STR) but "SAT1234" and "CARxccc"
are good (not beginning with STR).

I tried ^(STR) but this does not seem to work and

[^S][^T][^R]

does not allowe.g. "SAT"

Any ideas please?
Colin
Received on Tuesday, 1 July 2003 05:10:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:39 GMT