arrays - How to extract number from string -
my array contains string :
eth1 eth12 eth20 eth35 eth5 i want array contains number of these string :
1 12 20 35 5 i tried trimend() function, don't know how specify this...
thanks
this way
$mynewarray = $myarray -replace 'eth' if text not 'eth'
$mynewarray = $myarray -replace '\d'
Comments
Post a Comment