RosettaCodeData/Task/Tokenize-a-string/Red/tokenize-a-string.red
2023-07-01 13:44:08 -04:00

8 lines
350 B
Text

str: "Hello,How,Are,You,Today"
>> tokens: split str ","
>> probe tokens
["Hello" "How" "Are" "You" "Today"]
>> periods: replace/all form tokens " " "." ;The word FORM converts the list series to a string removing quotes.
>> print periods ;then REPLACE/ALL spaces with period
Hello.How.Are.You.Today