- From: <zongaro@ca.ibm.com>
- Date: Wed, 3 Oct 2001 11:52:53 -0400
- To: www-xml-schema-comments@w3.org
- Message-ID: <OFB6861A18.F8FC0929-ON85256ADA.0056D7B1@torolab.ibm.com>
Hello,
I wrote:
>>>>>>>
For example, consider a regular set of strings consisting of any
number of the letters a and b, but at most one instance of each of the
letters c and d. One way of specifying this is as follows:
(a|b)*((c?(a|b)*d?)|(d?(a|b)*c?))(a|b)*
It's much easier to express by saying it has the following form:
(a|b|c|d)*
with the added restriction that that there is at most one instance of each
of c and d.
<<<<<<<
Another way of describing this language would be as the intersection
of the languages generated by the following regular expression:
(a|b|c)*d?(a|b|c)* and (a|b|d)*c?(a|b|d)*
Of course, I still thinks that's not as clear as (a|b|c|d)* with the
additional prose restriction.
If someone has a more concise way of describing this using only
regular expressions, please jump in.
Thanks,
Henry
------------------------------------------------------------------------
Henry Zongaro XML Parsers development
IBM SWS Toronto Lab Tie Line 969-6044; Phone (905) 413-6044
mailto:zongaro@ca.ibm.com
Received on Wednesday, 3 October 2001 11:53:00 UTC