powershell wtf
✓ Published0🌍 Public
RRestuta
Last edited Mar 28, 2013
Created on Mar 28, 2013
This example illustrates a PowerShell script that extracts a changeset ID from a Git commit message using two different approaches. It first demonstrates a successful method using a `Where-Object` pipeline with a regular expression, followed by a direct `-Match` operator, both printing the captured group to the console. The script then shows a commented-out version where the `-Match` operator fails, producing a "Cannot index into a null array" error, highlighting the difference in handling matched results. The code relies on PowerShell's built-in regex matching and `Write-Host`, drawing data from `git log`.
AI-generated description