Playing Chicken With Common Sense

I am just putting some of my regular expressions here so that I can view it later.  So no one should care about this post at all! :)

 

In Visual Studio I needed to find every single line comment which also included the word IsNew in it.

^\s*//.*IsNew.*$

 

This will match from the beginning of the line (^) any whitespace characters (\s*) up to the comments (//). Then anything after the comments (.*) up to IsNew (IsNew) and after IsNew (.*) to the end of line ($).

  • 1 Comments
  • E-mail
  • Kick it!
  • Shout it
  • Bookmark and Share

Comments

Brad Merrell Brad Merrell   United States 4/30/2008 3:37:33 PM #

Nice Title to an interesting article.  Your Reverse Logic worked on me, I read it and foudn it useful. I have a regular expression question.  I have a textbox which I would like to use a regular expression validator in .net.  If the textbox contains (1) a valid number or (2) is blank then everything is okay, otherwise I want it to fail.  Any idea on this one?

Control panel

RecentComments

Comment RSS