I have a “raw” variable that store:
*rawVariable =* "Hello" "World" "String 1" "String 2" "String 3" "Sting 4"
"Hello" "World" "String 5" "String 6" "String 7" "String 8"
"Hello" "World" "String 9" "String 10" "String 11" "String 12"
Is it possible that I store the word in a array with front and back double quotes as a delimiter?
I unable to use " as delimiter.
Example:
formattedArray = ["Hello","World","String 1","String 2","String
3","Sting 4","Hello","World" "String 5","String 6","String 7","String
8","Hello","World","String 9","String 10","String 11","String 12"]
Note:
- There are different spacing (including
\n) between the word. - I will be storing into 2D array after the formattedArray.
I’m not 100% sure if I understand your question, but I’m guessing the following code might help you:
gives the following output:
Is that what you need?