RosettaCodeData/Task/I-before-E-except-after-C/Ed/i-before-e-except-after-c-2.ed
2024-10-16 18:07:41 -07:00

35 lines
482 B
Text

# e-before-i-with-c.ed
H
# Remove all the non-rule-related words
v/(cie|cei)/d
# Replace the occurences with one-letter markers
g/ei/s/.*/e/
g/ie/s/.*/i/
,j
# Remove 1 occurence of i (alternative) per two e (null)
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
s/eei//
s/iee//
# Check whether there are more e's in the output (null hypothesis true) or not
,p
Q