While we intuitively recognize character patterns within a string like IP addresses, dates, UNC paths, and zip codes, computers have to work a bit harder in order to “understand” complicated formats like these. That’s where regular expressions come into play.
In the November issue of TechNet Magazine, Don Jones explains how to create well-written regular expressions for Windows PowerShell scripts that determine whether incoming data conforms to the format you’ve specified. This enables your scripts to accept only valid input and reject any invalid data, simplifying things for you.
Don also highlights, as his cmdlet of the month, the Write-Debug cmdlet, which is handy for writing objects (such as text strings) to the Debug pipeline.