Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell - Get Capital Letters from a string

$
0
0

Hi there

Im doing a script to get the content of a text file which helds several names in a variable called $names.
After that, i need to get the capital letters only and put this in another variable, which will be called $id.

I.e.: $names = John Wayne

$id must be JW 

$names = Peter of Griffin

$id must be PG

Any tip?

Thanks!


João



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>