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

Remove characters except numbers from variable string

$
0
0

Hi, my script queries some linux servers for ram memory, but it returns the value as:

$ram = MemTotal:        3521384 kB

Is there a way that i can remove all characters except numbers from the variable?

Thanks


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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