Change e letters to i in words: Difference between revisions

Added AutoHotkey
(Added R. Very short.)
(Added AutoHotkey)
Line 535:
victor <- vector
willis <- welles</pre>
 
=={{header|AutoHotkey}}==
<lang AutoHotkey>FileRead, db, % A_Desktop "\unixdict.txt"
oWord := []
for i, word in StrSplit(db, "`n", "`r")
if (StrLen(word) > 5)
oWord[word] := true
 
for word in oWord
if InStr(word, "e") && oWord[StrReplace(word, "e", "i")]
result .= word . (StrLen(word) > 8 ? "`t" : "`t`t") . ": " StrReplace(word, "e", "i") "`n"
 
MsgBox, 262144, , % result</lang>
{{out}}
<pre>analyses : analysis
atlantes : atlantis
bellow : billow
breton : briton
clench : clinch
convect : convict
crises : crisis
diagnoses : diagnosis
enfant : infant
enquiry : inquiry
frances : francis
galatea : galatia
harden : hardin
heckman : hickman
inequity : iniquity
inflect : inflict
jacobean : jacobian
marten : martin
module : moduli
pegging : pigging
psychoses : psychosis
rabbet : rabbit
sterling : stirling
synopses : synopsis
vector : victor
welles : willis</pre>
 
=={{header|AWK}}==
299

edits