I was wondering how to make a regular expression for any character except *
and +
. I've tried ([^*+])
and ([^*+])
but both expressions seem to be incorrect. Can someone please point me in the right direction? Thanks.
Edit: Here is a code snipet. I've attached the reg ex suggested below into visual studio and it still generates an error when i enter in a regular string.
<xsd:element name="elementName">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:pattern value="/^[^*+]+$/"></xsd:pattern>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Edit: The example string I'm using is "test"
The result is pattern constraint fail with the current reg ex: /^[^*+]+$/
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…