Regex not equal to string

Posted by Kieron on Stack Overflow See other posts from Stack Overflow or by Kieron
Published on 2010-06-03T09:26:40Z Indexed on 2010/06/03 9:44 UTC
Read the original article Hit count: 498

Filed under:
|

Hi,

I'm banging my head against a wall with a regular expression. I'm trying to define an expression that excludes exactly this text 'System' (case insensitive), but can contain the word 'System' providing it's not just that.

Examples:

  • System == INVALID
  • SYSTEM == INVALID
  • system == INVALID
  • syStEm == INVALID
  • asd SysTem == Valid
  • asd System asd == Valid
  • System asd == Valid
  • asd System == Valid
  • asd == Valid

© Stack Overflow or respective owner

Related posts about .NET

Related posts about regex