我正在尝试使用正则表达式来阅读我的文档以识别货币类型,无论它们是$,£还是a €.我创建的正则表达式似乎不起作用,有人请告诉我它应该是什么.我真的很感激帮助:
我创建的正则表达式("\$|£|€]")是在我的XSD文件中的simpleType中,用于验证文档.代码显示在冒号后面:
<xs:simpleType name="currencyType">
<xs:restriction base="utf8-string">
<xs:length value="1" />
<xs:pattern value="[\$|£|€]"/>
</xs:restriction>
</xs:simpleType>
Run Code Online (Sandbox Code Playgroud)