Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

How to find nth word in a line or string?

$
0
0

I have bunch of log files and want to extract certain words out of them, so they can be formatted into a summarized table. They are all similar enough to be able to know which word in a line that I need extracted. For example I want the 5th word in the 1st line. I understand I can use [1] to get the line that I need, but not sure about the word. Thank you for any help given!


Viewing all articles
Browse latest Browse all 10624

Trending Articles