Substring/Top and tail: Difference between revisions
Add ed example
(PascalABC.NET) |
(Add ed example) |
||
Line 793:
Remove both : (s.size < 2 ? "" : s[1..<s.size-1]).quoted()="b"
</pre>
=={{header|ed}}==
On the example of "knight".
<syntaxhighlight lang="sed">
# by Artyom Bologov
H
t0
t0
1s/.\(.*\)/\1/
2s/\(.*\)./\1/
3s/.\(.*\)./\1/
,p
Q
</syntaxhighlight>
{{out}}
<pre>$ ed -s top-and-tail.input < top-and-tail.ed
Newline appended
night
knigh
nigh</pre>
=={{header|Eero}}==
|