Tokenize a string: Difference between revisions
Content added Content deleted
(PascalABC.NET}) |
(Add ed example) |
||
Line 1,688: | Line 1,688: | ||
. |
. |
||
</syntaxhighlight> |
</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}}== |
=={{header|Elena}}== |