Behind the PowerShell Pipeline logo

Behind the PowerShell Pipeline

Subscribe
Archives
September 15, 2022

A PowerShell Parsing Problem

Recently, I received an email from a reader, Danny. He was looking for help with a parsing problem in PowerShell. He had a log file to re-format to meet a specific result. This isn’t unusual. We often format results in PowerShell to suit our needs. Although typically, we are formatting objects which make the task easier. Danny was using regular expressions to replace data. He had a working solution but was curious if there was a better way.

And that’s a challenging aspect of PowerShell. There is almost always more than one way to achieve the desired result. If you are new to PowerShell, it may not always be obvious which path to take. In this article, I want to share how I approached Danny’s problem and the possible solutions. And yes, there will be regular expressions!

The Data

Want to read the full issue?
GitHub Bluesky LinkedIn About Jeff
Powered by Buttondown, the easiest way to start and grow your newsletter.