Palindrome detection: Difference between revisions

add sed
(add sed)
Line 5,209:
#f
></syntaxhighlight>
 
=={{header|sed}}==
<syntaxhighlight lang="sed">h
:l
s/^\(.\)\(.*\)\1$/\2/
tl
/../d
x</syntaxhighlight><pre>
$ printf '%s\n' a zz az bag gag none madamimadam otto | sed -f palindrome.sed
a
zz
gag
madamimadam
otto
</pre>
 
=={{header|Seed7}}==
559

edits