Charcoal, 2525 16 bytes
⊙⌕Aθe⊙⌕Aθn⁼✂θλ⊕ι÷⁻ιλ³nice⊙θ⊙θ№✂θκLθ⊕μnice
⌕A Find all positions of
e Literal string `e`
θ In inputInput string
⊙ Any end positionindex satisfies
⌕A Find all positions of
n Literal string `n`
θ In inputInput string
⊙ Any start positionindex satisfies
θ Input string
✂ Sliced in steps of
ι End position
⁻ Minus
λ Start position
÷ μ Integer dividedInner byindex
⊕ ³ Literal `3`Incremented
λ κ From startouter positionindex
⊕ι Lθ To end position "inclusive"
the end of the string
⁼ № Count Isi.e. equalcontains tosubstring
nice Literal string `nice`
The code tries to slice precinct
from position 5
to position 2
but this doesn't work: "precinct"[5:2+1:-1]
is just ni
, therefore this slice is rejected as desired. Another rejection occurs when the start and end point are not an exact multiple of 3
apart, in which case the slice will undershoot the final e
.