Ron's Sandbox

Regular Expressions (Case Sensitive)

Tuesday, 2 June 2009 23:54 by hagermanr

Regular expressions are case sensitive for the most part. My users of SCOM tend to create groups and use regular expressions against the host names to get a list of servers they own.

They generally look like this:

^(xch\-|XCH\-)

This returns all Exchange servers both upper and lower case. What happens though when the object is mixed? I have one customer who couldn’t see his server that had the first letter capitalized.

The fix of course, remove the case sensitivity. Try this, it works REALLY well!

^(?i:(xch\-))

Ron

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading