Find words whose first and last three letters are equal: Difference between revisions
Find words whose first and last three letters are equal (view source)
Revision as of 01:01, 28 February 2022
, 2 years agoAdd Red
(Added XPL0 example.) |
(Add Red) |
||
Line 672:
for IN.IO.lines { .say if .chars > L and .substr(0,N) eq .substr(*-N,*) }
</lang>
{{out}}
<pre>
antiperspirant
calendrical
einstein
hotshot
murmur
oshkosh
tartar
testes
</pre>
=={{header|Red}}==
<lang rebol>Red[]
foreach word read/lines %unixdict.txt [
if all [
greater? length? word 5
equal? take/part copy word 3 take/part/last copy word 3
][
print word
]
]</lang>
{{out}}
<pre>
|