I have a tag like this
<order>foo,bar,goo,doo,woo</order>
that I need to validate with an xsd.
How do I write a regexp pattern that matches the string that contains:
- List item any of {foo,bar,goo,doo,woo} maximum once
- or is empty.
Valid examples:
<order>foo,bar,goo,doo,woo</order>
<order>foo,bar,goo</order>
<order>foo,doo,goo,woo</order>
<order>woo,foo,goo,doo,bar</order>
<order></order>
Invalid:
<order>foo,foo</order>
<order>,</order>
<order>fo</order>
<order>foobar</order>
This have to work in different XML/XSD parsers.