Text Processing13 / 14
Up next

Select-String (grep-like)

$lines = "error: disk", "info: ok", "error: net"
# two error lines
$lines | Select-String -Pattern '^error' | ForEach-Object { $_.Line }
What you're solving

match lines and read the matched value