concept regular expression in category powershell

This is an excerpt from Manning's book Windows PowerShell in Action, Third Edition.
Note this will still produce a lot of output. You can use more sophisticated regular expressions (see section 3.4 for more information on regular expressions).
The code creates a nicely formatted display courtesy of the formatting and output subsystem built into PowerShell. In the world of unstructured text, you’ll quickly run into examples where simple splits aren’t enough. As is so often the case, regular expressions come to the rescue.
Regular expressions are a domain-specific language (DSL) for matching and manipulating text. We covered a number of examples using regular expressions with the -match and -replace operators in chapter 3. This time, you’re going to work with the regular expression class itself.

This is an excerpt from Manning's book PowerShell in Depth, Second Edition.
Another comparison operator set, -match, -cmatch, -notmatch, and -cnotmatch, is used with regular expressions. Because it’s a big topic, we’re devoting an entire chapter to it (chapter 13). The PowerShell help file called about_comparison_operators also discusses –contains, -notcontains, and -replace. These, together with the bitwise operators, are the subject of later sections in this chapter.
Regular expressions are a powerful and complex language you can use to describe data patterns. Most pattern-based data, including email addresses, phone numbers, IP addresses, and more, can be represented as a “regex,” as they’re also known.
We need to set some limits for this chapter, because regular expressions are complex enough to deserve their own book. PowerShell uses industry-standard regex syntax and supports the full .NET regular expression library, but we’ll only be covering the basics. Most of our focus will be on how PowerShell uses a regex once you’ve written one. If you’d like to explore regular expressions further, write more complex expressions, or look for a regex that meets a particular need, we recommend one of these two books as a starting place: Mastering Regular Expressions by Jeffrey E.F. Friedl (a favorite), and Regular Expression Pocket Reference by Tony Stubblebine, both from O’Reilly. You can also visit http://RegExLib.com, a free community repository of regular expressions for specific tasks.

This is an excerpt from Manning's book PowerShell Deep Dives.
Users are told to make their input match "^\d{3}-\d{2}-\d{4}$" and try again. Really? Even experienced PowerShell users need a few moments to decode a regular expression. An alternative way to write the function is to provide users with informative feedback:
You can use regular expressions (regex) in multiple ways. In this section I’ll show you one example to give you an idea of the impact regex can have.