Monthly Archives: July 2008

Regular Expression (RegEx) to Find Whole Words in a String

Ever want to match and replace whole words with in a string?  Regular expressions (System.Text.RegularExpressions) makes it a one line operation: Regex.Replace(inputText, @"\b" + wordToReplace + @"\b", replacementText, RegexOptions.IgnoreCase); This pattern uses “word boundries” as your delimiters for matching text.

Posted in C#, Regular Expressions | Leave a comment

WinForm Exception Catching

Here’s a general way to catch most outside exceptions in your WinForm code.  Add this to your program wrapper:   Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);   AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); Of course, it is always better to handle specific cases with … Continue reading

Posted in C#, WinForms | Leave a comment

How to Shrink Your Database Transaction Log

How to Shrink Your Database Transaction Log If you have noticed that your transaction log on your SQL Server database has grown incredibly large after a long transactional process, you can try this to shrink it back down:   DBCC … Continue reading

Posted in MS SQL Server | Leave a comment

July 2008 Issue of TechNet Magazine: IT Toolbox

The July 2008 issue of TechNet Magazine is out on the website. Check out my IT Toolbox column here: http://technet.microsoft.com/magazine/438b8ff5-6e55-47ff-9e05-a05233f48c8c In this issue I covered: Automise 2 Automate Admin Tasks BareTailPro Monitor Logs in Realtime Total Network Inventory Inventory your Systems Mastering Microsoft … Continue reading

Posted in Microsoft TechNet | Leave a comment

July 2008 Issue of TechNet Magazine: Utility Spotlight: Microsoft SharedView

The July 2008 issue of TechNet Magazine is out on the website. Check out my Utility Spotlight on Microsoft SharedView: Microsoft SharedView

Posted in Microsoft TechNet | Leave a comment