Change e letters to i in words: Difference between revisions

Content deleted Content added
Thebigh (talk | contribs)
add freebasic
Line 429: Line 429:
psychoses => psychosis rabbet => rabbit sterling => stirling synopses => synopsis
psychoses => psychosis rabbet => rabbit sterling => stirling synopses => synopsis
vector => victor welles => willis
vector => victor welles => willis
</pre>

=={{header|Perl}}==
<lang perl>#!/usr/bin/perl

use strict; # https://rosettacode.org/wiki/Change_e_letters_to_i_in_words
use warnings;
no warnings 'uninitialized';

my $file = do { local (@ARGV, $/) = 'unixdict.txt'; <> };
my %i = map { tr/i/e/r => sprintf "%30s %s\n", tr/i/e/r, $_ }
grep !/e/, grep 5 <= length, $file =~ /^.*i.*$/gm;
print @i{ split ' ', $file };</lang>
{{out}}
<pre>
analyses analysis
atlantes atlantis
basel basil
bellow billow
belly billy
berth birth
blend blind
bless bliss
breton briton
check chick
clench clinch
convect convict
cress criss
enfant infant
faery fairy
fetch fitch
fleck flick
frances francis
galatea galatia
harden hardin
heckman hickman
jacobean jacobian
marten martin
messy missy
module moduli
oases oasis
peggy piggy
psychoses psychosis
quell quill
rabbet rabbit
ruben rubin
share shari
shell shill
spell spill
style styli
synopses synopsis
taper tapir
tread triad
vector victor
vella villa
welles willis
wells wills
wendy windy
wrest wrist
</pre>
</pre>