Skip to Content
Learn PowerShell in a Month of Lunches, Fourth Edition
book

Learn PowerShell in a Month of Lunches, Fourth Edition

by Tyler Leonhardt, Travis Plunk, James Petty
May 2022
Beginner content levelBeginner
360 pages
10h 10m
English
Manning Publications
Content preview from Learn PowerShell in a Month of Lunches, Fourth Edition

21 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 of in UNIX and Linux operating systems. In PowerShell, you tend to do less text parsing—and you tend to need regexes less often. That said, we certainly know of times when, in PowerShell, you need to parse textual content such as a log file. That’s how we cover regular expressions in this chapter: as a tool to parse text files.

Don’t get us wrong: there’s much more you can do with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PowerShell for Sysadmins

PowerShell for Sysadmins

Adam Bertram

Publisher Resources

ISBN: 9781617296963Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link