V
Valentino Lun
Dear all
I have the following string want to convert to arry
str="/dev/lis_home_712 2097152 1052656 1044496 51%
/appl/lis/home2\n"
I use str.scan(/\w+/), which give the following result
["dev", "lis_home_712", "2097152", "1052656", "1044496", "51", "appl",
"lis", "home2"]
However, I expect the result like this
["dev/lis_home_712", "2097152", "1052656", "1044496", "51%",
"/appl/lis/home2"]
Please advise on how to do it. Thank you.
I have the following string want to convert to arry
str="/dev/lis_home_712 2097152 1052656 1044496 51%
/appl/lis/home2\n"
I use str.scan(/\w+/), which give the following result
["dev", "lis_home_712", "2097152", "1052656", "1044496", "51", "appl",
"lis", "home2"]
However, I expect the result like this
["dev/lis_home_712", "2097152", "1052656", "1044496", "51%",
"/appl/lis/home2"]
Please advise on how to do it. Thank you.