Jump to content

Tokenize a string: Difference between revisions

Add ed example
(PascalABC.NET})
(Add ed example)
 
Line 1,688:
.
</syntaxhighlight>
 
=={{header|ed}}==
 
It's a cheating, but still. Replacing commas by periods fulfills the requirements. If not for the period requirement, the code would split commas into newlines for readability
 
<syntaxhighlight lang="sed">
# by Artyom Bologov
H
,p
s/,/./g
,p
Q
</syntaxhighlight>
 
{{out}}
 
<pre>$ cat tokenize.ed | ed -lEGs tokenize.input
Newline appended
Hello,How,Are,You,Today
Hello.How.Are.You.Today</pre>
 
=={{header|Elena}}==
96

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.