I am trying to parse out words from a file using:
$string = "Ziggy Ziggy.stardust Ziggy."
$string -split "\W+"
Ziggy
Ziggy
stardust
Ziggy
I want to be able to have output as follows (i.e. don't split on periods in the middle of the word, but do if it's the last character of a word:
Ziggy Ziggy.stardust Ziggy
My next step is to make a list of phrases that use this construct, but to capture a phrase (2+ construct words).