regex - xsd validation failing for regular expression -
i using below simpletype allowing 5 type of words. working fine. problem is, failing, if appended 1 character upper case @ end of string.
please me regarding this.
<xsd:simpletype name="updatememberphysicalcardtypetype"> <xsd:annotation> <xsd:documentation> type physical data type </xsd:documentation> </xsd:annotation> <xsd:restriction base="xsd:string"> <xsd:pattern value="([permanent|temporary|not carded|retail card|virtual card])*"/> </xsd:restriction> </xsd:simpletype>
success case: <typ:physicalcardtype>permanent</typ:physicalcardtype>
-> working fine
<typ:physicalcardtype>permanentqwer</typ:physicalcardtype>
-> getting error. working fine.
failure case: <typ:physicalcardtype>permanentd</typ:physicalcardtype>
-> not getting error. not working. allowing word. should not allow one.
this want.
<xsd:pattern value="permanent|temporary|not carded|retail card|virtual card"/>
here's useful page on matter: http://www.regular-expressions.info/xml.html