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

Re: schema pattern matching (negate)

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 1 Jul 2003 15:59:18 +0100
Message-ID: <150500958930.20030701155918@jenitennison.com>
To: "Colin Mackenzie" <colin@elecmc.com>
CC: xmlschema-dev@w3.org

Hi Colin,

> 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 think you can use:

  (([^S].*)|(S[^T].*)|(ST[^R].*))

in other words, the string can start with something that isn't S; or
it can start with S, as long as it's followed by something that isn't
T; or it can start with ST, as long as it's followed by something that
isn't R.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Tuesday, 1 July 2003 10:59:22 GMT

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