Path: csiph.com!weretis.net!feeder8.news.weretis.net!newsfeed.xs3.de!nntp-feed.chiark.greenend.org.uk!ewrotcd!usenet.inf.ed.ac.uk!.POSTED!not-for-mail From: richard@cogsci.ed.ac.uk (Richard Tobin) Newsgroups: rec.puzzles,comp.lang.lisp,comp.lang.python Subject: Re: ( Substring function in Python, Lisp) -- [Hijack] contains [hijk] Date: Sun, 16 Feb 2025 19:02:35 +0000 (UTC) Organization: Language Technology Group, University of Edinburgh Lines: 13 Message-ID: References: <7513d4f4cf89bfd31edda3eb5ed84052@www.novabbs.com> <87v7tabai9.fsf@nightsong.com> NNTP-Posting-Host: macaroni.inf.ed.ac.uk X-Trace: macpro.inf.ed.ac.uk 1739732555 58664 129.215.197.42 (16 Feb 2025 19:02:35 GMT) X-Complaints-To: usenet@macpro.inf.ed.ac.uk NNTP-Posting-Date: Sun, 16 Feb 2025 19:02:35 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: richard@cogsci.ed.ac.uk (Richard Tobin) Xref: csiph.com rec.puzzles:26474 comp.lang.lisp:60245 comp.lang.python:197255 In article <87v7tabai9.fsf@nightsong.com>, Paul Rubin wrote: >> $ awk 'BEGIN {for(i=97; i<=118; i++) printf("%c.*%c.*%c.*%c.*%c\n", i, >> i+1, i+2, i+3, i+4);}' | while read e; do grep -i $e >> /usr/share/dict/words; done >Nice! That picked up "Kilimanjaro" which my more complicated Python >script missed, because it didn't case-fold. Or, closer to (my) home, "Kilmarnock". -- Richard