O'Reilly logo

Learn Windows PowerShell 3 in a Month of Lunches, Second Edition by Don Jones and Jeffery Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 24. Using regular expressions to parse text files

Regular expressions are one of those awkward topics. We often have students ask us to explain them, only to realize—halfway through the conversation—that they didn’t need regular expressions at all. A regex, as a regular expression is sometimes known, is useful in text parsing, which is something you end up doing a lot in Unix and Linux operating systems. In PowerShell, you tend to do less text parsing—and we also find you tend to need regexes less often. That said, we certainly know of times when, in PowerShell, you need to parse some textual content, such as an IIS log file. That’s how we’ll be covering regular expressions in this chapter: as a tool to parse text files.

Don’t get us ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required