Remove empty comments in VS2012

To remove empty comments form Visual Studio 2012 use this regular expression:

^(?([^\r\n])\s)*//\r?$

and replace all the matches with nothing. Just make sure you are only searching in *.cs files. Because this can mess up other files, like JavaScript

Apparently whitespace is matched by (?([^\r\n])\s) in VS search and replace tool. While \s is a white space including new line and carriage return character

Reference to Visual Studio 2012 regular expression search is here: http://msdn.microsoft.com/en-us/library/2k3te2cs.aspx

Regular Expression to match at least one letter and at least one digit

Sometimes you would like to check passwords to be conformant with some rules. At least one digit, one letter is a common one. Here is the regexp for this:

(?=.*?[0-9])(?=.*?[A-Za-z]).+

Allows special characters and makes sure at least one number and one letter.

Update:

(?=.*?[0-9])(?=.*?[A-Za-z])(?=.*[^0-9A-Za-z]).+

Demands at least one letter, one digit and one special-character. The first one does not demand special chars, only allows them.