我已经将正则表达式用于yes no type。但是编译器会抛出这样的异常。
<xsd:simpleType name="YesNoType">
<xsd:annotation>
<xsd:documentation>
Type for yes and no inputs.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:pattern value="(?:Y|N)"/>
</xsd:restriction>
</xsd:simpleType>
InvalidRegex:模式值'(?:Y | N)'不是有效的正则表达式。报告的错误为:“当前选项设置中不支持此表达式。”。
请帮助我。
只需将其替换为更简单的内容即可
Y|N
或者
[YN]
之类的。
未捕获的括号未在所有正则表达式版本中实现。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句