Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Exclusion matches

  •  02-17-2007, 3:58 AM

    Exclusion matches

    Hi Guys,

    I need a bit of help in coming with a RegEx pattern to catch sequences that should not be in th input string.

    What i am working on goes like this....

    I seek to filter out unwanted string patterns from input strings using an XSD. For example, i'd like to create a <xsd:simpleType> which derives form <xsd:string> and place restrictions on the input string with a <xsd:restriction> facet which should invalidate the input instance document if any of the nodes of type string contain markup information. That is, my string validation rule staets that the input should NOT contain any kind of tags. Then, I'd like to extend this idea and derive another <xs:simpleType> which prevents <script> tags.

    This way I want to build a valiation net around before my services by filtering out bad input.

    I can't use the straight forward match pattern as the validation with the schema will include other validation rules like lenght and format restrictions. I need a exclusion pattern. For some reason syntax like (?!pattern) does not work. In any case, this is not a universal syntax and won't help me.

    Filed under: ,
View Complete Thread