Movatterモバイル変換


[0]ホーム

URL:


Jump to content
Rosetta Code
Search

ABC words

From Rosetta Code
Task
ABC words
You are encouraged tosolve this task according to the task description, using any language you may know.


Definition

A word is an  ABC word   if the letters  "a",  "b"  and  "c"  appear in the word in alphabetical order.

If any or all of these letters occur more than once in a word, then only the first occurrence of each letter should be used to determine whether a word is an  ABC word  or not.


Task

Show here   (on this page)   every  ABC word  inunixdict.txt.


Other tasks related to string operations:
Metrics
Counting
Remove/replace
Anagrams/Derangements/shuffling
Find/Search/Determine
Formatting
Song lyrics/poems/Mad Libs/phrases
Tokenize
Sequences



11l

L(ln) File(‘unixdict.txt’).read().split("\n")   V? a = ln.find(‘a’)   I a != N      V b = ln.findi(‘b’)      I a < b & b < ln.findi(‘c’)         print(ln)
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Action!

In the following solution the input fileunixdict.txt is loaded from H6 drive. Altirra emulator automatically converts CR/LF character from ASCII into 155 character in ATASCII charset used by Atari 8-bit computer when one from H6-H10 hard drive under DOS 2.5 is used.

BYTE FUNC FindC(CHAR ARRAY text CHAR c)  BYTE i  i=1  WHILE i<=text(0)  DO    IF text(i)=c THEN      RETURN (i)    FI    i==+1  ODRETURN (0)BYTE FUNC IsAbcWord(CHAR ARRAY word)  BYTE a,b,c  a=FindC(word,'a)  IF a=0 THEN RETURN (0) FI  b=FindC(word,'b)  IF b<a THEN RETURN (0) FI  c=FindC(word,'c)  IF c<b THEN RETURN (0) FIRETURN (1)PROC FindAbcWords(CHAR ARRAY fname)  CHAR ARRAY line(256)  CHAR ARRAY tmp(256)  BYTE pos,dev=[1]  pos=2  Close(dev)  Open(dev,fname,4)  WHILE Eof(dev)=0  DO    InputSD(dev,line)    IF IsAbcWord(line) THEN      IF pos+line(0)>=40 THEN        PutE() pos=2      FI      Print(line) Put(32)      pos==+line(0)+1    FI  OD  Close(dev)RETURNPROC Main()  CHAR ARRAY fname="H6:UNIXDICT.TXT"  FindAbcWords(fname)RETURN
Output:

Screenshot from Atari 8-bit computer

aback abacus abc abdicate abductabeyance abject abreact abscessabscissa abscissae absence abstractabstracter abstractor adiabaticaerobacter aerobic albacore alberichalbrecht algebraic alphabeticambiance ambuscade aminobenzoicanaerobic arabic athabascan auerbachdiabetic diabolic drawback fabricfabricate flashback halfback iambiclampblack leatherback metabolicnabisco paperback parabolic playbackprefabricate quarterback razorbackroadblock sabbatical snapbackstrabismic syllabic tabernacletablecloth

Ada

withAda.Text_Io;withAda.Strings.Fixed;procedureAbc_WordsisuseAda.Text_Io;functionIs_Abc_Word(Word:String)returnBooleanisuseAda.Strings.Fixed;Pos_A:constantNatural:=Index(Word,"a");Pos_B:constantNatural:=Index(Word,"b");Pos_C:constantNatural:=Index(Word,"c");beginreturnPos_B>Pos_AandPos_C>Pos_BandPos_A/=0andPos_B/=0andPos_C/=0;endIs_Abc_Word;Filename:constantString:="unixdict.txt";File:File_Type;Column:Ada.Text_Io.Count:=0;beginOpen(File,In_File,Filename);whilenotEnd_Of_File(File)loopdeclareWord:constantString:=Get_Line(File);beginifIs_Abc_Word(Word)thenSet_Col(1+Column);Column:=(Column+15)mod120;Put(Word);endif;end;endloop;Close(File);endAbc_Words;
Output:
aback          abacus         abc            abdicate       abduct         abeyance       abject         abreactabscess        abscissa       abscissae      absence        abstract       abstracter     abstractor     adiabaticaerobacter     aerobic        albacore       alberich       albrecht       algebraic      alphabetic     ambianceambuscade      aminobenzoic   anaerobic      arabic         athabascan     auerbach       diabetic       diabolicdrawback       fabric         fabricate      flashback      halfback       iambic         lampblack      leatherbackmetabolic      nabisco        paperback      parabolic      playback       prefabricate   quarterback    razorbackroadblock      sabbatical     snapback       strabismic     syllabic       tabernacle     tablecloth

ALGOL 68

With regular expressions

For use with compilers/interpreters that support using regular expressions viagrep in string procedure which is available inALGOL 68G.

Works with:ALGOL 68G version Any - tested with release 2.8.3.win32
Library:ALGOL 68-files

Note, the source of files.incl.a68 is on a separate page on Rosetta Code - see the above link.

BEGIN # find words that have "a", "b" and "C" in order in them               #    PR read "files.incl.a68" PR                     # include file utilities #    # prints word if the characters "a", "b" and "c" appear in order in it   #    # count so far is thw number of preceding "abc" words                    #    # returns TRUE if word is such an "abc" word, FALSE otherwise            #    PROC show abc word = ( STRING word, INT count so far )BOOL:         IF   grep in string( "^[^bc]*a[^c]*b.*c", word, NIL, NIL ) = 0         THEN INT abc count = count so far + 1;              print( ( whole( abc count, -5 ), ": ", word, newline ) );              TRUE         ELSE FALSE         FI # show abc word # ;    IF "unixdict.txt" EACHLINE show abc word < 0 THEN        print( ( "Unable to open unixdict.txt", newline ) )    FIEND
Output:
    1: aback    2: abacus    3: abc    4: abdicate    5: abduct    6: abeyance    7: abject    8: abreact    9: abscess   10: abscissa   11: abscissae   12: absence   13: abstract   14: abstracter   15: abstractor   16: adiabatic   17: aerobacter   18: aerobic   19: albacore   20: alberich   21: albrecht   22: algebraic   23: alphabetic   24: ambiance   25: ambuscade   26: aminobenzoic   27: anaerobic   28: arabic   29: athabascan   30: auerbach   31: diabetic   32: diabolic   33: drawback   34: fabric   35: fabricate   36: flashback   37: halfback   38: iambic   39: lampblack   40: leatherback   41: metabolic   42: nabisco   43: paperback   44: parabolic   45: playback   46: prefabricate   47: quarterback   48: razorback   49: roadblock   50: sabbatical   51: snapback   52: strabismic   53: syllabic   54: tabernacle   55: tablecloth

Without regular expressions

An alternative version for compilers/interpreters that don't have thegrep in string procedure

Library:ALGOL 68-files

Note, the source of files.incl.a68 is on a separate page on Rosetta Code - see the above link.

BEGIN # find words that have "a", "b" and "C" in order in them               #    PR read "files.incl.a68" PR                     # include file utilities #    # prints word if the characters "a", "b" and "c" appear in order in it   #    # count so far is thw number of preceding "abc" words                    #    # returns TRUE if word is such an "abc" word, FALSE otherwise            #    PROC show abc word = ( STRING word, INT count so far )BOOL:         IF   INT w max  = UPB word;              INT a pos := w max + 1;              INT b pos := w max + 1;              INT c pos := w max + 1;              VOID( char in string( "a", a pos, word ) );              VOID( char in string( "b", b pos, word ) );              VOID( char in string( "c", c pos, word ) );              a pos <  b pos          AND b pos <  c pos          AND c pos <= w max         THEN INT abc count = count so far + 1;              print( ( whole( abc count, -5 ), ": ", word, newline ) );              TRUE         ELSE FALSE         FI # show abc word # ;    IF "unixdict.txt" EACHLINE show abc word < 0 THEN        print( ( "Unable to open unixdict.txt", newline ) )    FIEND
Output:

Same as the regular expression version.

APL

Works with:Dyalog APL
abcwords{'abc'words((~∊)⎕TC⊆⊢)80¯1⎕MAPmatch/∊,2</(match¨words)/words}
Output:
      11 5 ⍴ abcwords 'unixdict.txt' aback         abacus       abc         abdicate    abduct       abeyance      abject       abreact     abscess     abscissa     abscissae     absence      abstract    abstracter  abstractor   adiabatic     aerobacter   aerobic     albacore    alberich     albrecht      algebraic    alphabetic  ambiance    ambuscade    aminobenzoic  anaerobic    arabic      athabascan  auerbach     diabetic      diabolic     drawback    fabric      fabricate    flashback     halfback     iambic      lampblack   leatherback  metabolic     nabisco      paperback   parabolic   playback     prefabricate  quarterback  razorback   roadblock   sabbatical   snapback      strabismic   syllabic    tabernacle  tablecloth

AppleScript

Core language

This is a fairly simple solution, hard-coded for "a", "b", and "c". The 'offset' commands are performed by AppleScript's StandardAdditions OSAX, so the time taken by the multiple communications between the script and the OSAX makes the code comparatively slow. Still, the overall running time with the specified file on my current machine is less than 1.5 seconds.

onabcWords(wordFile)-- The word file text is assumed to be UTF-8 encoded and to have one word per line.scriptopropertywordList:paragraphsof(readwordFileas «class utf8»)endscriptsetoutputto{}repeatwiththisWordino'swordListsetthisWordtothisWord'scontentsif((thisWordcontains"c")and¬(text1thru(offsetof"c"inthisWord)ofthisWordcontains"b")and¬(text1thru(offsetof"b"inthisWord)ofthisWordcontains"a"))then¬setendofoutputtothisWordendrepeatreturnoutputendabcWordsreturnabcWords(((path todesktopastext)&"www.rosettacode.org:unixdict.txt")asalias)
Output:
{"aback","abacus","abc","abdicate","abduct","abeyance","abject","abreact","abscess","abscissa","abscissae","absence","abstract","abstracter","abstractor","adiabatic","aerobacter","aerobic","albacore","alberich","albrecht","algebraic","alphabetic","ambiance","ambuscade","aminobenzoic","anaerobic","arabic","athabascan","auerbach","diabetic","diabolic","drawback","fabric","fabricate","flashback","halfback","iambic","lampblack","leatherback","metabolic","nabisco","paperback","parabolic","playback","prefabricate","quarterback","razorback","roadblock","sabbatical","snapback","strabismic","syllabic","tabernacle","tablecloth"}

The following alternative uses delimiters and text items instead and is considerably faster at around 0.25 seconds. Also, for the hell of it, it takes the characters (or even longer substrings) that the returned words must contain as a parameter. Same output here as above.

onabcWords(wordFile,theLetters)-- The word file text is assumed to be UTF-8 encoded and to have one word per line.scriptopropertywordList:paragraphsof(readwordFileas «class utf8»)endscriptsetoutputto{}setletterCountto(counttheLetters)setastidtoAppleScript'stext item delimitersrepeatwiththisWordino'swordListsetthisWordtothisWord'scontentssetthisLettertoendoftheLettersif(thisWordcontainsthisLetter)thensetmatchedtotruerepeatwithcfrom(letterCount-1)to1by-1setAppleScript'stext item delimiterstothisLettersetthisLettertoitemcoftheLetterssetmatchedto(thisWord'sfirsttextitemcontainsthisLetter)if(notmatched)thenexitrepeatendrepeatif(matched)thensetendofoutputtothisWordendifendrepeatsetAppleScript'stext item delimiterstoastidreturnoutputendabcWordsreturnabcWords(((path todesktopastext)&"www.rosettacode.org:unixdict.txt")asalias,{"a","b","c"})

AppleScriptObjC

This is faster still at 0.01 seconds and uses AppleScriptObjC to access the regex facilities provided by macOS's Foundation framework. It too takes the characters the returned words must contain as a parameter, but, unlike the script above, doesn't recognise longer substring inputs as units in themselves. Same output as with the two "Core language" scripts above.

useAppleScriptversion"2.4"-- OS X 10.10 (Yosemite) or lateruseframework"Foundation"usescriptingadditionsonabcWords(wordFile,theLetters)-- This NSString method used here guesses the word file's text encoding itself.setwordTexttocurrent application'sclass"NSString"'sstringWithContentsOfFile:(POSIXpathofwordFile)¬usedEncoding:(missing value)|error|:(missing value)-- Assuming one word per line, build a regex pattern to match words containing the specified letters in the given order.settheLetterstojoin(theLetters,"")setpatternto"(?mi)^"repeatwithcfrom1to(counttheLetters)setpatterntopattern&(("[^"&textcthruendoftheLetters)&("\\v]*+"&charactercoftheLetters))endrepeatsetpatterntopattern&".*+$"setregexObjtocurrent application'sclass"NSRegularExpression"'s¬regularExpressionWithPattern:(pattern)options:(0)|error|:(missing value)setwordMatchestoregexObj'smatchesInString:(wordText)options:(0)range:({0,wordText's|length|()})setmatchRangestowordMatches'svalueForKey:("range")setoutputto{}repeatwiththisRangeinmatchRangessetendofoutputto(wordText'ssubstringWithRange:(thisRange))astextendrepeatreturnoutputendabcWordsonjoin(lst,delim)setastidtoAppleScript'stext item delimiterssetAppleScript'stext item delimiterstodelimsettxttolstastextsetAppleScript'stext item delimiterstoastidreturntxtendjoinreturnabcWords(((path todesktopastext)&"www.rosettacode.org:unixdict.txt")asalias,{"a","b","c"})

Arturo

words:read.linesrelative"unixdict.txt"isABC?:function[w][a:indexw"a"ifnull?a->returnfalseb:indexw"b"ifnull?b->returnfalseifb<a->returnfalsec:indexw"c"ifnull?c->returnfalseifc<b->returnfalsereturntrue]print.linesselectwords=>isABC?
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

AutoHotkey

FileRead,unixdict,unixdict.txtLoop,Parse,unixdict,`nifABCWord(A_LoopField){count++text.=count": "A_LoopField"`n"}Msgbox,%text%ABCWord(Word){ifInStr(Word,"a")ifInStr(Word,"b")>InStr(Word,"a")ifInStr(Word,"c")>InStr(Word,"b")returntrueelsereturnfalseelsereturnfalseelsereturnfalse}
Output:
1: aback2: abacus3: abc4: abdicate5: abduct6: abeyance7: abject8: abreact9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

AWK

The following one-liner entered into a Posix shell returns the same 55 words as other entries.

awk'/^[^bc]*a[^c]*b.*c/'unixdict.txt

Ballerina

importballerina/io;publicfunctionmain()returnserror?{stringwordList="unixdict.txt";// local copyvarwords=checkio:fileReadLines(wordList);intcount=0;io:println("Based on first occurrences only, the ABC words in ",wordList," are:");foreachstringwordinwords{int?a=word.indexOf("a");ifa==(){continue;}int?b=word.indexOf("b");ifb==()||b<=a{continue;}int?c=word.indexOf("c");ifc==()||c<=b{continue;}count+=1;io:println(count.toString().padStart(2),": ",word);}}
Output:
Based on first occurrences only, the ABC words in unixdict.txt are: 1: aback 2: abacus 3: abc 4: abdicate 5: abduct 6: abeyance 7: abject 8: abreact 9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

BASIC

10DEFINTA,B,C:DEFSTRW20OPEN"I",1,"unixdict.txt"30IFEOF(1)THENEND40LINEINPUT#1,W50A=INSTR(W,"a")60B=INSTR(W,"b")70C=INSTR(W,"c")80IFA>0ANDB>0ANDC>0ANDA<BANDB<CTHENPRINTW,90GOTO30
Output:
aback         abacus        abc           abdicate      abductabeyance      abject        abreact       abscess       abscissaabscissae     absence       abstract      abstracter    abstractoradiabatic     aerobacter    aerobic       albacore      alberichalbrecht      algebraic     alphabetic    ambiance      ambuscadeaminobenzoic  anaerobic     arabic        athabascan    auerbachdiabetic      diabolic      drawback      fabric        fabricateflashback     halfback      iambic        lampblack     leatherbackmetabolic     nabisco       paperback     parabolic     playbackprefabricate  quarterback   razorback     roadblock     sabbaticalsnapback      strabismic    syllabic      tabernacle    tablecloth

BCPL

get "libhdr"let find(s, c) = valof$(  for i=1 to s%0        if s%i=c then resultis i    resultis -1$)let match(word) = valof$(  let a = find(word, 'a')    let b = find(word, 'b')    let c = find(word, 'c')    resultis a ~= -1 & b ~= -1 & c ~= -1 & a<b & b<c$)let read(word) = valof$(  let ch = ?    word%0 := 0    $(  ch := rdch()        if ch = endstreamch then resultis false        word%0 := word%0 + 1        word%(word%0) := ch    $) repeatuntil ch = '*N'    resultis true$)let start() be$(  let word = vec 63    let file = findinput("unixdict.txt")    test file = 0 then         writes("Cannot open unixdict.txt*N")    else    $(  selectinput(file)        while read(word) if match(word) do writes(word)        endread()    $)$)
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

BQN

Match⊣≡(˜∧∊)/⊢•Show5"abc"<(Match¨/⊢)•Flines"unixdict.txt"
Output:
┌─╵ "aback"        "abacus"      "abc"        "abdicate"   "abduct"  "abeyance"     "abject"      "abreact"    "abscess"    "abscissa"  "abscissae"    "absence"     "abstract"   "abstracter" "abstractor"  "adiabatic"    "aerobacter"  "aerobic"    "albacore"   "alberich"  "albrecht"     "algebraic"   "alphabetic" "ambiance"   "ambuscade"  "aminobenzoic" "anaerobic"   "arabic"     "athabascan" "auerbach"  "diabetic"     "diabolic"    "drawback"   "fabric"     "fabricate"  "flashback"    "halfback"    "iambic"     "lampblack"  "leatherback"  "metabolic"    "nabisco"     "paperback"  "parabolic"  "playback"  "prefabricate" "quarterback" "razorback"  "roadblock"  "sabbatical"  "snapback"     "strabismic"  "syllabic"   "tabernacle" "tablecloth"                                                                       ┘

C

#include<stdio.h>#include<string.h>intmatch(constchar*word){constchar*a=strchr(word,'a');constchar*b=strchr(word,'b');constchar*c=strchr(word,'c');returna&&b&&c&&a<b&&b<c;}intmain(){charword[80];FILE*file=fopen("unixdict.txt","r");if(!file){fprintf(stderr,"Cannot open unixdict.txt");return-1;}while(!feof(file)){fgets(word,sizeof(word),file);if(match(word))printf("%s",word);}return0;}
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

C#

Takes an optional command line for other character combinations. User can specify any reasonable number of unique characters. Caveat: see discussion page for issue about specifying repeated characters.

classProgram{staticvoidMain(string[]args){intbi,i=0;stringchars=args.Length<1?"abc":args[0];foreach(variteminSystem.IO.File.ReadAllLines("unixdict.txt")){intai=-1;foreach(varchinchars)if((bi=item.IndexOf(ch))>ai)ai=bi;elsegotoskip;System.Console.Write("{0,3} {1,-18} {2}",++i,item,i%5==0?"\n":"");skip:;}}}
Output:

Without command line arguments:

  1 aback                2 abacus               3 abc                  4 abdicate             5 abduct  6 abeyance             7 abject               8 abreact              9 abscess             10 abscissa 11 abscissae           12 absence             13 abstract            14 abstracter          15 abstractor 16 adiabatic           17 aerobacter          18 aerobic             19 albacore            20 alberich 21 albrecht            22 algebraic           23 alphabetic          24 ambiance            25 ambuscade 26 aminobenzoic        27 anaerobic           28 arabic              29 athabascan          30 auerbach 31 diabetic            32 diabolic            33 drawback            34 fabric              35 fabricate 36 flashback           37 halfback            38 iambic              39 lampblack           40 leatherback 41 metabolic           42 nabisco             43 paperback           44 parabolic           45 playback 46 prefabricate        47 quarterback         48 razorback           49 roadblock           50 sabbatical 51 snapback            52 strabismic          53 syllabic            54 tabernacle          55 tablecloth

With command line argument "alw":

  1 afterglow            2 airflow              3 alewife              4 allentown            5 alleyway  6 allow                7 allowance            8 alway                9 always              10 baldwin 11 barlow              12 bartholomew         13 bungalow            14 caldwell            15 candlewick 16 cauliflower         17 fallow              18 foamflower          19 galloway            20 gallows 21 galway              22 halfway             23 hallow              24 halloween           25 hallway 26 malawi              27 mallow              28 marlowe             29 marshmallow         30 mayflower 31 metalwork           32 railway             33 sallow              34 saltwater           35 sandalwood 36 shadflower          37 shallow             38 stalwart            39 tailwind            40 tallow

C++

#include<cstdlib>#include<fstream>#include<iostream>boolis_abc_word(conststd::string&word){boola=false;boolb=false;for(charch:word){switch(ch){case'a':if(!a)a=true;break;case'b':if(!b){// fail if we haven't seen 'a' yetif(!a)returnfalse;b=true;}break;case'c':// succeed iff we've seen 'b' alreadyreturnb;}}returnfalse;}intmain(intargc,char**argv){constchar*filename(argc<2?"unixdict.txt":argv[1]);std::ifstreamin(filename);if(!in){std::cerr<<"Cannot open file '"<<filename<<"'.\n";returnEXIT_FAILURE;}std::stringword;intn=1;while(getline(in,word)){if(is_abc_word(word))std::cout<<n++<<": "<<word<<'\n';}returnEXIT_SUCCESS;}
Output:
1: aback2: abacus3: abc4: abdicate5: abduct6: abeyance7: abject8: abreact9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

CLU

abc_word = proc (s: string) returns (bool)    a: int := string$indexc('a', s)    b: int := string$indexc('b', s)    c: int := string$indexc('c', s)        return(a>0 cand b>a cand c>b)end abc_wordstart_up = proc ()     po: stream := stream$primary_output()    dict: stream := stream$open(file_name$parse("unixdict.txt"), "read")    while true do        word: string := stream$getl(dict)        if abc_word(word) then stream$putl(po, word) end    end except when end_of_file: end    stream$close(dict)end start_up
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

COBOL

IDENTIFICATIONDIVISION.PROGRAM-ID.ABC-WORDS.ENVIRONMENTDIVISION.INPUT-OUTPUTSECTION.FILE-CONTROL.SELECTDICTASSIGNTODISKORGANIZATIONLINESEQUENTIAL.DATADIVISION.FILESECTION.FDDICTLABELRECORDSTANDARDVALUEOFFILE-IDIS"unixdict.txt".01WORDPIC X(32).WORKING-STORAGESECTION.01APIC 99.01BPIC 99.01CPIC 99.01XPIC 99.PROCEDUREDIVISION.BEGIN.OPENINPUTDICT.READ-WORD.READDICT,ATENDCLOSEDICT,STOPRUN.PERFORMCHECK-WORD.GOTOREAD-WORD.CHECK-WORD.MOVEZEROTOA,B,C,X.INSPECTWORDTALLYINGAFORCHARACTERSBEFOREINITIAL'a'.INSPECTWORDTALLYINGBFORCHARACTERSBEFOREINITIAL'b'.INSPECTWORDTALLYINGCFORCHARACTERSBEFOREINITIAL'c'.INSPECTWORDTALLYINGXFORCHARACTERSBEFOREINITIAL' '.IFAISLESSTHANBANDBISLESSTHANCANDCISLESSTHANX,DISPLAYWORD.
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Crystal

File.read("unixdict.txt").each_line.select(/^[^bc]*a[^c]*b.*c/).eachdo|word|putswordend
Output:

The same 55 as everybody.

D

importstd.algorithm;importstd.file;importstd.stdio;importstd.string;voidmain(){"unixdict.txt".readText().splitLines().each!((s){if(s.canFind("a")&&s.canFind("b")&&s.canFind("c")&&(s.countUntil("a")<s.countUntil("b"))&&(s.countUntil("b")<s.countUntil("c"))){writeln(s);}});}
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Delphi

Library: System.SysUtils
Library: System.IoUtils
Translation of:C#
programABC_words;{$APPTYPE CONSOLE}usesSystem.SysUtils,System.IoUtils;varbi,ai,i:Integer;chars,item:string;ch:char;skip:boolean;beginbi:=0;i:=0;chars:='abc';ifParamCount>0thenchars:=ParamStr(1);writeln('Search words with letters "',chars,'"  in alphabetical order'#10);foriteminTFile.ReadAllLines('unixdict.txt')dobeginai:=-1;skip:=false;forchincharsdobeginbi:=item.IndexOf(ch);ifbi>aithenbeginai:=bi;endelsebeginskip:=true;Break;end;end;ifnotskipthenbegininc(i);write(i:3,' ',item.PadRight(18));ifimod5=0thenwriteln;end;end;{$IFNDEF UNIX}readln;{$ENDIF}end.

Diego

add_ary({str},foundWords);with_file()    ()_read⟦{raw},unixdict.txt⟧_splitto(words,⟦\n⟧)        (words)_if⟦[posA]<[posB]<[posC]⟧)_findto(posA,⟦a⟧)_i⟪0⟫_findto(posB,⟦b⟧)_i⟪0⟫_findto(posC,⟦c⟧)_i⟪0⟫            ?_(foundWords)_add⟦words⟪⟫⟧;        ;    ;;log_console()_(foundWords);

Alternatively...

add_ary({str},foundWords);with_file()    ()_read⟦{raw},unixdict.txt⟧_splitto(words,⟦\n⟧)        (words)_foreach(word)            ?_(word)_findto(posA,⟦a⟧)_i⟪0⟫;            ?_(word)_sliceto(foundA,⟦[posA]⟧)                ?_(foundA)_findto(posB,⟦b⟧)_i⟪0⟫;                ?_(foundA)_sliceto(foundB,⟦[posB]⟧)                    ?_(foundB)_find⟦c⟧                        ?_(foundWords)_add[word];                    ;                ;            ;        ;    ;;log_console()_(foundWords);

Output:

aback,abacus,abc,abdicate,abduct,abeyance,abject,abreact,abscess,abscissa,abscissae,absence,abstract,abstracter,abstractor,adiabatic,aerobacter,aerobic,albacore,alberich,albrecht,algebraic,alphabetic,ambiance,ambuscade,aminobenzoic,anaerobic,arabic,athabascan,auerbach,diabetic,diabolic,drawback,fabric,fabricate,flashback,halfback,iambic,lampblack,leatherback,metabolic,nabisco,paperback,parabolic,playback,prefabricate,quarterback,razorback,roadblock,sabbatical,snapback,strabismic,syllabic,tabernacle,tablecloth

Draco

\util.gproc nonrec abc_word(*char line) bool:    int a, b, c;    a := CharsIndex(line, "a");    b := CharsIndex(line, "b");    c := CharsIndex(line, "c");    a ~= -1 and a < b and b < ccorpproc nonrec main() void:    file(1024) dictfile;    [32] char buf;    *char line;    channel input text dict;        open(dict, dictfile, "unixdict.txt");    line := &buf[0];        while readln(dict; line) do        if abc_word(line) then writeln(line) fi    od;        close(dict)corp
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

DuckDB

Works with:DuckDB version V1.0

Using a regex

selectcolumn0asabcfromread_csv_auto('unixdict.txt',header=false,sep='\t')whereregexp_matches(column0,'^[^bc]*a[^c]*b.*c');
Output:

as below.

Avoiding regex

createorreplacefunctionis_abc_word(word)as(withcteas(selectinstr(word,'a')asa,instr(word,'b')asb,instr(word,'c')asc)select(0<aanda<bandb<c)fromcte);selectcolumn0asabcfromread_csv_auto('unixdict.txt',header=false,sep='\t')whereis_abc_word(column0);
Output:

Synopsis:

┌──────────────┐│     abc      ││   varchar    │├──────────────┤│ aback        ││ abacus       ││ abc          ││ abdicate     │...│ tablecloth   │├──────────────┤│   55 rows    ││  (40 shown)  │└──────────────┘

EasyLang

repeat   s$ = input   until s$ = ""   a = strpos s$ "a"   b = strpos s$ "b"   c = strpos s$ "c"   if a > 0 and b > a and c > b      print s$   ..# # the content of unixdict.txt input_data10thdrawbackfabric

ed

# by Artyom BologovHv/^[^abc]*a[^bc]*b[^c]*c/d,pQ
Output:
$ ed -s unixdict.txt < abc.ed abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth


F#

// ABC words. Nigel Galloway: August 29th., 2024letisABCn=System.Text.RegularExpressions.Regex.Match(n,"^[^bc]*a[^c]*b.*c").Value.Length>0System.IO.File.ReadLines"unixdict.txt"|>Seq.filterizABC|>Seq.iter(printfn"%s")
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Factor

USING:groupingio.encodings.asciiio.fileskernelprettyprintsequencessets;"unixdict.txt"asciifile-lines["abc"withinmembers"abc"=]filter5groupsimple-table.
Output:
aback        abacus      abc        abdicate   abductabeyance     abject      abreact    abscess    abscissaabscissae    absence     abstract   abstracter abstractoradiabatic    aerobacter  aerobic    albacore   alberichalbrecht     algebraic   alphabetic ambiance   ambuscadeaminobenzoic anaerobic   arabic     athabascan auerbachdiabetic     diabolic    drawback   fabric     fabricateflashback    halfback    iambic     lampblack  leatherbackmetabolic    nabisco     paperback  parabolic  playbackprefabricate quarterback razorback  roadblock  sabbaticalsnapback     strabismic  syllabic   tabernacle tablecloth

Forth

Works with:Gforth
:abc-word?( addr u -- ? )falsefalse{ab}0dodupc@case'a'oftruetoaendof'b'ofainvertifunloopdropfalseexitthentruetobendof'c'ofunloopdropbexitendofendcase1+loopdropfalse;256constantmax-line:main00{countfd-in}s"unixdict.txt"r/oopen-filethrowtofd-inbeginheremax-linefd-inread-linethrowwhilehereswap2dupabc-word?ifcount1+tocountcount2.r.":"typecrelse2dropthenrepeatdropfd-inclose-filethrow;mainbye
Output:
 1: aback 2: abacus 3: abc 4: abdicate 5: abduct 6: abeyance 7: abject 8: abreact 9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

Fortran

! ABC Words! tested with Intel ifx (IFX) 2025.2.0 20250605             on Kubuntu 25.04!             GNU Fortran (Ubuntu 14.2.0-19ubuntu2) 14.2.0  on Kubuntu 25.04!             VSI Fortran x86-64 V8.6-001                   on OpenVMS x86_64 V9.2-3! Note that VMS requires switch $Fortran/ccdefault=LIST! otherwise 1st character of each output line is interpreted as! Carriage Control character.!! U.B., July 2025!programabc_wordsimplicit nonecharacter(len=100)::word! long enough to carry longes expected wordcharacter(len=12),parameter::filename='unixdict.txt'integer::l,io_stat! Length of read word, and status of read operationinteger::abc_wordcount=0! counter for detected abc wordsopen(unit=10,file=filename,status='old',action='read',iostat=io_stat)if(io_stat/=0)then     print*,"Error opening file ",filenamestop  end if  do    read(10,'(a)',iostat=io_stat)wordl=len_trim(word)if(io_stat<0)exit! EOF, normal end of inputif(io_stat>0)then! read error, unexpected failureprint*,"Read error"exit    end if    if(is_abc(word(1:l)))then      print'(A)',word(1:l)abc_wordcount=abc_wordcount+1end if  end do  close(10)print'(/"File ", A, " contains ", i0, " ABC words")',filename,abc_wordcountcontains   functionis_abc(word)result(word_is_abcword)character(len=*),intent(in)::wordlogical::word_is_abcwordinteger::posABC(3)posABC=locateABC(word)word_is_abcword=posABC(1).gt.0.and.posABC(1)<posABC(2).and.posABC(2).lt.posABC(3)end functionis_abcfunctionlocateABC(word)result(posABC)character(len=*),intent(in)::wordinteger::posABC(3)integer::iiposABC(1)=0posABC(2)=0posABC(3)=0doii=1,len_trim(word)if(word(ii:ii).eq.'a')then         if(posABC(1).eq.0)posABC(1)=iielse if(word(ii:ii).eq.'b')then         if(posABC(2).eq.0)posABC(2)=iielse if(word(ii:ii).eq.'c')then         if(posABC(3).eq.0)posABC(3)=iiendif   enddo   end functionlocateABCend programabc_words
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletableclothFile unixdict.txt contains 55 ABC words

FreeBASIC

#defineNOTINSTRING9999functionfirst_occ(sasstring,letterasstring)asuintegerforiasubyte=1tolen(s)ifmid(s,i,1)=letterthenreturninextireturnNOTINSTRING-asc(letter)endfunctionfunctionis_abc(sasstring)asbooleaniffirst_occ(s,"a")>first_occ(s,"b")thenreturnfalseiffirst_occ(s,"b")>first_occ(s,"c")thenreturnfalseiffirst_occ(s,"c")>len(s)thenreturnfalsereturntrueendfunctiondimasstringworddimasuintegerc=0open"unixdict.txt"forinputas#1whiletruelineinput#1,wordifword=""thenexitwhileifis_abc(word)thenc+=1printc;".   ";wordendifwendclose#1
Output:
1.   aback2.   abacus3.   abc4.   abdicate5.   abduct6.   abeyance7.   abject8.   abreact9.   abscess10.   abscissa11.   abscissae12.   absence13.   abstract14.   abstracter15.   abstractor16.   adiabatic17.   aerobacter18.   aerobic19.   albacore20.   alberich21.   albrecht22.   algebraic23.   alphabetic24.   ambiance25.   ambuscade26.   aminobenzoic27.   anaerobic28.   arabic29.   athabascan30.   auerbach31.   diabetic32.   diabolic33.   drawback34.   fabric35.   fabricate36.   flashback37.   halfback38.   iambic39.   lampblack40.   leatherback41.   metabolic42.   nabisco43.   paperback44.   parabolic45.   playback46.   prefabricate47.   quarterback48.   razorback49.   roadblock50.   sabbatical51.   snapback52.   strabismic53.   syllabic54.   tabernacle55.   tablecloth

FutureBasic

FB 7.0.34 macOS 14.7.2 (Sonoma)

include "NSLog.incl"local fn WordList as CFArrayRef  CFArrayRef wordList = NULL  CFURLRef url = fn URLWithString( @"http://wiki.puzzlers.org/pub/wordlists/unixdict.txt" )  CFStringRef string = fn StringWithContentsOfURL( url, NSUTF8StringEncoding, NULL )  if ( string ) then wordList = fn StringComponentsSeparatedByCharactersInSet( string, fn CharacterSetNewlineSet )end fn = wordListvoid local fn ABCWords  CFArrayRef  list = fn WordList  CFStringRef string  long        abc  if ( list ) == NULL then NSLog(@"Unable to load word list") : exit fn  for string in list    abc = instr( 0,   string, @"a")    if ( abc == NSNotFound ) then continue    abc = instr( abc, string, @"b")    if ( abc == NSNotFound ) then continue    abc = instr( abc, string, @"c")    if ( abc != NSNotFound ) then NSLog(@"%@",string)  nextend fnfn ABCWordsHandleEvents
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Go

packagemainimport("bytes""fmt""io/ioutil""log")funcmain(){wordList:="unixdict.txt"b,err:=ioutil.ReadFile(wordList)iferr!=nil{log.Fatal("Error reading file")}bwords:=bytes.Fields(b)count:=0fmt.Println("Based on first occurrences only, the ABC words in",wordList,"are:")for_,bword:=rangebwords{a:=bytes.IndexRune(bword,'a')b:=bytes.IndexRune(bword,'b')c:=bytes.IndexRune(bword,'c')ifa>=0&&b>a&&c>b{count++fmt.Printf("%2d: %s\n",count,string(bword))}}}
Output:
Based on first occurrences only, the ABC words in unixdict.txt are: 1: aback 2: abacus 3: abc 4: abdicate 5: abduct 6: abeyance 7: abject 8: abreact 9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

Haskell

importData.List(elemIndex)importData.Maybe(isJust)------------------------ ABC WORDS -----------------------isABC::String->BoolisABCs=isJust$residue"bc"'a's>>=residue"c"'b'>>=elemIndex'c'residue::String->Char->String->MaybeStringresidueexceptc=gowherego[]=Nothinggo(x:xs)|x`elem`except=Nothing|c==x=Justxs|otherwise=goxs--------------------------- TEST -------------------------main::IO()main=readFile"unixdict.txt">>=mapM_print.zip[1..].filterisABC.lines
Output:
(1,"aback")(2,"abacus")(3,"abc")(4,"abdicate")(5,"abduct")(6,"abeyance")(7,"abject")(8,"abreact")(9,"abscess")(10,"abscissa")(11,"abscissae")(12,"absence")(13,"abstract")(14,"abstracter")(15,"abstractor")(16,"adiabatic")(17,"aerobacter")(18,"aerobic")(19,"albacore")(20,"alberich")(21,"albrecht")(22,"algebraic")(23,"alphabetic")(24,"ambiance")(25,"ambuscade")(26,"aminobenzoic")(27,"anaerobic")(28,"arabic")(29,"athabascan")(30,"auerbach")(31,"diabetic")(32,"diabolic")(33,"drawback")(34,"fabric")(35,"fabricate")(36,"flashback")(37,"halfback")(38,"iambic")(39,"lampblack")(40,"leatherback")(41,"metabolic")(42,"nabisco")(43,"paperback")(44,"parabolic")(45,"playback")(46,"prefabricate")(47,"quarterback")(48,"razorback")(49,"roadblock")(50,"sabbatical")(51,"snapback")(52,"strabismic")(53,"syllabic")(54,"tabernacle")(55,"tablecloth")

Icon andUnicon

Tested with Icon but should also work with Unicon.

proceduremain()n:=0everyw:=!&inputdow?{ia:=upto('a')|nextib:=upto('b')|nextic:=upto('c')|nextifia<ib<icthen{writes("  ",w)if(n+:=1)%5=0thenwrite()}}ifn%5>0thenwrite()write("\n","found ",n," abc words")end
Output:

With standard input redirected to unixdict.txt:

  aback  abacus  abc  abdicate  abduct  abeyance  abject  abreact  abscess  abscissa  abscissae  absence  abstract  abstracter  abstractor  adiabatic  aerobacter  aerobic  albacore  alberich  albrecht  algebraic  alphabetic  ambiance  ambuscade  aminobenzoic  anaerobic  arabic  athabascan  auerbach  diabetic  diabolic  drawback  fabric  fabricate  flashback  halfback  iambic  lampblack  leatherback  metabolic  nabisco  paperback  parabolic  playback  prefabricate  quarterback  razorback  roadblock  sabbatical  snapback  strabismic  syllabic  tabernacle  tableclothfound 55 abc words

Java

importjava.io.BufferedReader;importjava.io.FileReader;publicclassAbcWords{publicstaticvoidmain(String[]args){StringfileName="unixdict.txt";Stringchars="abc";for(inti=0;i+1<args.length&&args[i].length()>1&&args[i].charAt(0)=='-';++i){switch(args[i].charAt(1)){case'f':fileName=args[++i];break;case'c':chars=args[++i];break;}}try(BufferedReaderreader=newBufferedReader(newFileReader(fileName))){Stringline;intn=0;while((line=reader.readLine())!=null){if(match(line,chars)){++n;System.out.printf("%3d: %-20s",n,line);if(n%3==0)System.out.println();}}if(n>0&&n%3!=0)System.out.println();}catch(Exceptione){e.printStackTrace();}}// Returns true if word contains every character in chars in the// same order. chars may contain the same character more than once.privatestaticbooleanmatch(Stringword,Stringchars){intlength=chars.length();boolean[]seen=newboolean[length];intwordLength=word.length();for(intw=0;w<wordLength;++w){charch=word.charAt(w);intindex=-1;for(intc=0;c<length;++c){if(ch==chars.charAt(c)&&!seen[c]){index=c;break;}}if(index==-1)continue;if(index+1==length)returnindex==0?true:seen[index-1];if(index>0&&!seen[index-1])returnfalse;seen[index]=true;}returnfalse;}}
Output:

With no command line arguments:

  1: aback                 2: abacus                3: abc                   4: abdicate              5: abduct                6: abeyance              7: abject                8: abreact               9: abscess              10: abscissa             11: abscissae            12: absence              13: abstract             14: abstracter           15: abstractor           16: adiabatic            17: aerobacter           18: aerobic              19: albacore             20: alberich             21: albrecht             22: algebraic            23: alphabetic           24: ambiance             25: ambuscade            26: aminobenzoic         27: anaerobic            28: arabic               29: athabascan           30: auerbach             31: diabetic             32: diabolic             33: drawback             34: fabric               35: fabricate            36: flashback            37: halfback             38: iambic               39: lampblack            40: leatherback          41: metabolic            42: nabisco              43: paperback            44: parabolic            45: playback             46: prefabricate         47: quarterback          48: razorback            49: roadblock            50: sabbatical           51: snapback             52: strabismic           53: syllabic             54: tabernacle           55: tablecloth

With command line arguments "-c pmm":

  1: anthropomorphism      2: epigrammatic          3: epimorphism           4: euphemism             5: optimism              6: optimum               7: pandemonium           8: pantomime             9: pantomimic           10: pemmican             11: persimmon            12: pessimism            13: pessimum             14: plummet              15: postmortem           16: pragmatism           17: praseodymium         18: premium              19: primitivism          20: programmable         21: programmed           22: programmer           23: programming          24: promethium           25: pummel               26: supremum

JavaScript

(()=>{"use strict";// -------------------- ABC WORDS --------------------// isABC :: String -> BoolconstisABC=s=>// True if the string contains each of 'a' 'b' 'c',// and their first occurrences in the string are// in that alphabetical order.bind(bind(residue("a")("bc")(s))(residue("b")("c")))(r=>r.includes("c")||null)!==null;// residue :: Char -> String -> String -> Maybe Stringconstresidue=c=>// Any characters remaining in a given string// after the first occurrence of c, or null// if c is not found, or is preceded by any// excluded characters.excluded=>{constgo=t=>(0<t.length)?(()=>{constx=t[0];returnexcluded.includes(x)?(null):c===x?(t.slice(1)):go(t.slice(1));})():null;returngo;};// ---------------------- TEST -----------------------constmain=()=>lines(readFile("~/unixdict.txt")).filter(isABC).map((x,i)=>`(${1+i},${x})`).join("\n");// --------------------- GENERIC ---------------------// bind (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe bconstbind=mb=>// Null if mb is null, or the application of the// (a -> Maybe b) function mf to the contents of mb.mf=>null===mb?(mb):mf(mb);// lines :: String -> [String]constlines=s=>// A list of strings derived from a single string// which is delimited by \n or by \r\n or \r.Boolean(s.length)?(s.split(/\r\n|\n|\r/u)):[];// readFile :: FilePath -> IO StringconstreadFile=fp=>{// The contents of a text file at the// given file path.conste=$(),ns=$.NSString.stringWithContentsOfFileEncodingError($(fp).stringByStandardizingPath,$.NSUTF8StringEncoding,e);returnObjC.unwrap(ns.isNil()?(e.localizedDescription):ns);};// MAIN ---returnmain();})();
Output:
(1, aback)(2, abacus)(3, abc)(4, abdicate)(5, abduct)(6, abeyance)(7, abject)(8, abreact)(9, abscess)(10, abscissa)(11, abscissae)(12, absence)(13, abstract)(14, abstracter)(15, abstractor)(16, adiabatic)(17, aerobacter)(18, aerobic)(19, albacore)(20, alberich)(21, albrecht)(22, algebraic)(23, alphabetic)(24, ambiance)(25, ambuscade)(26, aminobenzoic)(27, anaerobic)(28, arabic)(29, athabascan)(30, auerbach)(31, diabetic)(32, diabolic)(33, drawback)(34, fabric)(35, fabricate)(36, flashback)(37, halfback)(38, iambic)(39, lampblack)(40, leatherback)(41, metabolic)(42, nabisco)(43, paperback)(44, parabolic)(45, playback)(46, prefabricate)(47, quarterback)(48, razorback)(49, roadblock)(50, sabbatical)(51, snapback)(52, strabismic)(53, syllabic)(54, tabernacle)(55, tablecloth)

J

A word is an abc word if the order of the indices of 'a', 'b' and 'c' and the final letter of the word are unchanged by sorting. (The index of 'a' would be the length of the word -- one greater than the last index into the word -- if 'a' was missing from the word. So by including that last index in our list of indices to be sorted, we eliminate all words which are missing an 'a', 'b' or 'c'.)

>(#~(-:/:~)@(<:@#,~i.&'abc')@>)cutLFtolowerfread'unixdict.txt'abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

jq

Works with:jq

Works with gojq, the Go implementation of jq

def is_abc_word:  [index("a", "b", "c")]  | all(.[]; . != null) and .[0] < .[1] and .[1] < .[2] ;select(is_abc_word)

Invocation: jq -rR -f abc-words.jq unixdict.txt

Output:

(synopsis)

abackabacusabc...syllabictabernacletablecloth

Julia

SeeAlternade_words#Julia for the foreachword function.

functionisabcword(w,_)positions=[findfirst(c->c==ch,w)forchin"abc"]returnall(!isnothing,positions)&&issorted(positions)?w:""endforeachword("unixdict.txt",isabcword)
Output:
Word source: unixdict.txtaback          abacus         abc            abdicate       abduct         abeyance       abject         abreact        abscess        abscissa       abscissae      absenceabstract       abstracter     abstractor     adiabatic      aerobacter     aerobicalbacore       alberich       albrecht       algebraic      alphabetic     ambianceambuscade      aminobenzoic   anaerobic      arabic         athabascan     auerbach       diabetic       diabolic       drawback       fabric         fabricate      flashbackhalfback       iambic         lampblack      leatherback    metabolic      nabiscopaperback      parabolic      playback       prefabricate   quarterback    razorback      roadblock      sabbatical     snapback       strabismic     syllabic       tabernacletablecloth

There's also a regex based one liner.

Translation of:AWK
foreach(println,(lineforlineineachline("unixdict.txt")ifoccursin(r"^[^bc]*a[^c]*b.*c",line)))

Lua

forwordinio.lines('unixdict.txt')doifstring.find(word,"^[^bc]*a[^c]*b.*c")thenprint(word)endend

M2000 Interpreter

Using Stack of Values as a cache/temporary memory

ModuleCheck{cls#FFFFFF,0pen0print$(9)' proportional textdima$()documenta$load.doca$,"unixdict.txt"' now a$ has encoding UTF16LE using CRLFa$()=piece$(a$,chr$(13)+chr$(10))flushfori=0tolen(a$())-1ifa$(i)~"*a*b*c*"thenifinstr(a$(i),"a")<instr(a$(i),"b")thenifinstr(a$(i),"b")<instr(a$(i),"c")thendataa$(i)endifendifendifnextifnotemptythena$()=array$([])fori=0tolen(a$())-1printquote$(a$(i)),' quote$("a") return "a"nextprintendif}Check

Using Document Iterator

ModuleCheck{cls#FFFFFF,0pen0print$(9)' proportional textdocumenta$load.doca$,"unixdict.txt"flushm=Paragraph(a$,0)ifForward(a$,m)thenwhilemp$=Paragraph$(a$,(m))ifp$~"*a*b*c*"thenifinstr(p$,"a")<instr(p$,"b")thenifinstr(p$,"b")<instr(p$,"c")thenprintquote$(p$),endifendifendifendwhileendifprint}Check
Output:
ABC screenshot
ABC screenshot

Mathematica /Wolfram Language

ClearAll[unixdictWords,abcStringQ];unixdictWords=StringSplit@Import["https://web.archive.org/web/20180611003215/http://www.puzzlers.org/pub/wordlists/unixdict.txt"];abcStringQ[s_String]:=StringMatchQ[s,___~~"a"~~___~~"b"~~___~~"c"~~___];Select[abcStringQ][unixdictWords]
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoracerbicacrobacyacrobaticadiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachbabcockbarbaricbarbecuecambriccamelbackcanvasbackcarbonaceouscarboniccarboxyliccarbunclecatabolicclaustrophobicdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Modula-2

MODULEABCWords;IMPORTSeqIO;IMPORTTexts;FROMInOutIMPORTWriteString,WriteLn;FROMStringsIMPORTPos;VARfile:SeqIO.FILE;dict:Texts.TEXT;word:ARRAY[0..63]OFCHAR;fs:SeqIO.FileState;ts:Texts.TextState;PROCEDUREIsABCWord(word:ARRAYOFCHAR):BOOLEAN;VARa,b,c,missing:CARDINAL;BEGINmissing:=Pos("",word);a:=Pos("a",word);b:=Pos("b",word);c:=Pos("c",word);RETURN(a#missing)AND(b#missing)AND(c#missing)AND(a<b)AND(b<c);ENDIsABCWord;BEGINfs:=SeqIO.Open(file,"unixdict.txt");ts:=Texts.Connect(dict,file);WHILENOTTexts.EOT(dict)DOTexts.ReadLn(dict,word);IFIsABCWord(word)THENWriteString(word);WriteLn();END;END;ts:=Texts.Disconnect(dict);fs:=SeqIO.Close(file);ENDABCWords.
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Nim

importstrutilsfuncisAbcWord(word:string):bool=letia=word.find('a')ifia<0:returnfalseletib=word.find('b')ifib<ia:returnfalseletic=word.find('c')ific<ib:returnfalseresult=truevarcount=0forwordin"unixdict.txt".lines:ifword.isAbcWord:inccountecho($count).align(2),' ',word
Output:
 1 aback 2 abacus 3 abc 4 abdicate 5 abduct 6 abeyance 7 abject 8 abreact 9 abscess10 abscissa11 abscissae12 absence13 abstract14 abstracter15 abstractor16 adiabatic17 aerobacter18 aerobic19 albacore20 alberich21 albrecht22 algebraic23 alphabetic24 ambiance25 ambuscade26 aminobenzoic27 anaerobic28 arabic29 athabascan30 auerbach31 diabetic32 diabolic33 drawback34 fabric35 fabricate36 flashback37 halfback38 iambic39 lampblack40 leatherback41 metabolic42 nabisco43 paperback44 parabolic45 playback46 prefabricate47 quarterback48 razorback49 roadblock50 sabbatical51 snapback52 strabismic53 syllabic54 tabernacle55 tablecloth

Nu

open 'unixdict.txt' | split words | where $it =~ '(?i)^[^abc]*a[^bc]*b[^c]*c'
Output:
╭────┬──────────────╮│  0 │ aback        ││  1 │ abacus       ││  2 │ abc          ││  3 │ abdicate     ││  4 │ abduct       ││  5 │ abeyance     ││  6 │ abject       ││  7 │ abreact      ││  8 │ abscess      ││  9 │ abscissa     ││ 10 │ abscissae    ││ 11 │ absence      ││ 12 │ abstract     ││ 13 │ abstracter   ││ 14 │ abstractor   ││ 15 │ adiabatic    ││ 16 │ aerobacter   ││ 17 │ aerobic      ││ 18 │ albacore     ││ 19 │ alberich     ││ 20 │ albrecht     ││ 21 │ algebraic    ││ 22 │ alphabetic   ││ 23 │ ambiance     ││ 24 │ ambuscade    ││ 25 │ aminobenzoic ││ 26 │ anaerobic    ││ 27 │ arabic       ││ 28 │ athabascan   ││ 29 │ auerbach     ││ 30 │ diabetic     ││ 31 │ diabolic     ││ 32 │ drawback     ││ 33 │ fabric       ││ 34 │ fabricate    ││ 35 │ flashback    ││ 36 │ halfback     ││ 37 │ iambic       ││ 38 │ lampblack    ││ 39 │ leatherback  ││ 40 │ metabolic    ││ 41 │ nabisco      ││ 42 │ paperback    ││ 43 │ parabolic    ││ 44 │ playback     ││ 45 │ prefabricate ││ 46 │ quarterback  ││ 47 │ razorback    ││ 48 │ roadblock    ││ 49 │ sabbatical   ││ 50 │ snapback     ││ 51 │ strabismic   ││ 52 │ syllabic     ││ 53 │ tabernacle   ││ 54 │ tablecloth   │╰────┴──────────────╯

Oberon-07

Reads the words from standard input which should be redirected to unixdict.txt

Library:Oberon-07-words

The source of RcWords.Mod (the RC word utilities module) is on a separate page on Rosetta Code - see the above link.

MODULEAbcWords;(* find words containing the letters a, b and c where the *)(* positions of the first occurrence of each are in order *)IMPORTRcWords,Out,Strings;VARabcCount:INTEGER;PROCEDUREshowAbcWords(w:ARRAYOFCHAR);VARaPos,bPos,wLength,p:INTEGER;BEGINaPos:=Strings.Pos("a",w,0);IFaPos>=0THENbPos:=Strings.Pos("b",w,0);IF(bPos>aPos)&(Strings.Pos("c",w,0)>bPos)THENwLength:=Strings.Length(w);FORp:=wLength+1TO18DOOut.String(" ")END;Out.String(w);INC(abcCount);IFabcCountMOD5=0THENOut.LnENDENDENDENDshowAbcWords;BEGINabcCount:=0;RcWords.forEachWord(showAbcWords)ENDAbcWords.
Output:
             aback            abacus               abc          abdicate            abduct          abeyance            abject           abreact           abscess          abscissa         abscissae           absence          abstract        abstracter        abstractor         adiabatic        aerobacter           aerobic          albacore          alberich          albrecht         algebraic        alphabetic          ambiance         ambuscade      aminobenzoic         anaerobic            arabic        athabascan          auerbach          diabetic          diabolic          drawback            fabric         fabricate         flashback          halfback            iambic         lampblack       leatherback         metabolic           nabisco         paperback         parabolic          playback      prefabricate       quarterback         razorback         roadblock        sabbatical          snapback        strabismic          syllabic        tabernacle        tablecloth

OCaml

letis_abc_word(word:string):bool=tryString.indexword'a'|>funi->String.index_fromwordi'b'|>funi->String.index_fromwordi'c'|>ignore;truewithNot_found->falselet()=In_channel.with_open_text"unixdict.txt"In_channel.input_all|>String.split_on_char'\n'|>List.filteris_abc_word|>String.concat", "|>print_endline
Output:
aback, abacus, abc, abdicate, abduct, abeyance, abject, abreact, abscess, abscissa, abscissae, absence, abstract, abstracter, abstractor, acerbic, acrobacy, acrobatic, adiabatic, aerobacter, aerobic, albacore, alberich, albrecht, algebraic, alphabetic, ambiance, ambuscade, aminobenzoic, anaerobic, arabic, athabascan, auerbach, babcock, barbaric, barbecue, cambric, camelback, canvasback, carbonaceous, carbonic, carboxylic, carbuncle, catabolic, claustrophobic, diabetic, diabolic, drawback, fabric, fabricate, flashback, halfback, iambic, lampblack, leatherback, metabolic, nabisco, paperback, parabolic, playback, prefabricate, quarterback, razorback, roadblock, sabbatical, snapback, strabismic, syllabic, tabernacle, tablecloth

Objeck

Translation of:C
class AbcWords {  function : Main(args : String[]) ~ Nil {    reader := System.IO.Filesystem.FileReader->New("unixdict.txt");    while(<>reader->IsEoF()) {      word := reader->ReadLine();      if(Match(word)) {        "{$word}, "->Print();      };    };    ""->PrintLine();  }  function : Match(word : String) ~ Bool {    if(word = Nil) {      return false;    };    a_index := word->Find('a');    b_index := word->Find('b');    c_index := word->Find('c');    return a_index > -1 & b_index > -1 & c_index > -1 & a_index < b_index & b_index < c_index;  }}
Output:
aback, abacus, abc, abdicate, abduct, abeyance, abject, abreact, abscess, abscissa, abscissae, absence, abstract, abstracter, abstractor, adiabatic, aerobacter, aerobic, albacore, alberich, albrecht, algebraic, alphabetic, ambiance, ambuscade, aminobenzoic, anaerobic, arabic, athabascan, auerbach, diabetic, diabolic, drawback, fabric, fabricate, flashback, halfback, iambic, lampblack, leatherback, metabolic, nabisco, paperback, parabolic, playback, prefabricate, quarterback, razorback, roadblock, sabbatical, snapback, strabismic, syllabic, tabernacle, tablecloth,

Pascal

Free Pascal

Programabcwords;usesClasses;constFNAME='unixdict.txt';varlist:TStringList;str:string;a,b,c:integer;beginlist:=TStringList.Create;list.LoadFromFile(FNAME);forstrinlistdobegina:=pos('a',str);b:=pos('b',str);c:=pos('c',str);if(a>0)and(b>a)and(c>b)thenwriteln(str);end;end.
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

PascalABC.NET

Translation of:F#
// ABC words. Nigel Galloway: August 29th., 2024##varizABC:string->boolean:=n->System.Text.RegularExpressions.Regex.Match(n,'^[^bc]*a[^c]*b.*c').Value.Length>0;foreachs:stringinSystem.IO.File.ReadLines('unixdict.txt')doifizABC(s)thenprintln(s);
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Perl

Outputs same 55 words everyone else finds.

#!/usr/bin/perl@ARGV='unixdict.txt';printgrep/^[^bc]*a[^c]*b.*c/,<>;

Phix

withjavascript_semanticsfunctionabc(stringword)integer{ia,ib,ic}=apply(true,find,{"abc",{word}})returnia>0andib>iaandic>ibendfunctionsequencewords=filter(unix_dict(),abc)printf(1,"%d abc words found: %s\n",{length(words),join(shorten(words,"",3),", ")})
Output:
55 abc words found: aback, abacus, abc, ..., syllabic, tabernacle, tablecloth

PL/I

abcWords: procedure options(main);    declare dict file;    open file(dict) title('unixdict.txt');    on endfile(dict) stop;        declare word char(32) varying, col fixed;    col = 0;    do while('1'b);        get file(dict) list(word);                declare (a, b, c) fixed;        a = index(word, 'a');        b = index(word, 'b');        c = index(word, 'c');                if a ^= 0 & b ^= 0 & c ^= 0 & a < b & b < c then do;            put edit(word) (A(15));            col = col + 1;            if col = 5 then do;                put skip;                col = 0;            end;        end;    end;    end abcWords;
Output:
aback          abacus         abc            abdicate       abductabeyance       abject         abreact        abscess        abscissaabscissae      absence        abstract       abstracter     abstractoradiabatic      aerobacter     aerobic        albacore       alberichalbrecht       algebraic      alphabetic     ambiance       ambuscadeaminobenzoic   anaerobic      arabic         athabascan     auerbachdiabetic       diabolic       drawback       fabric         fabricateflashback      halfback       iambic         lampblack      leatherbackmetabolic      nabisco        paperback      parabolic      playbackprefabricate   quarterback    razorback      roadblock      sabbaticalsnapback       strabismic     syllabic       tabernacle     tablecloth

Pluto

Translation of:Wren
localword_list="unixdict.txt"-- local copylocalfile=io.open(word_list,"r")localcount=0print($"Based on first occurrences only, the ABC words in {word_list} are:")forwordinfile:lines()dolocala=word:find("a")??0localb=word:find("b")??0localc=word:find("c")??0if0<a<b<cdo++countprint(string.format("%2d: %s",count,word))endendfile:close()
Output:
Identical to Wren entry.

Processing

String[] words;void setup() {  words = loadStrings("unixdict.txt");  int count = 1;  for (int i = 0; i < words.length; i++) {    if (isAbcWord(words[i])) {      println(count + " " + words[i]);      count++;    }  }}boolean isAbcWord(String word) {  if (word.contains("a") && word.indexOf("a") < word.indexOf("b") && word.indexOf("b") < word.indexOf("c")) {    return true;  }  return false;}
Output:
1 aback2 abacus3 abc4 abdicate5 abduct6 abeyance7 abject8 abreact9 abscess10 abscissa11 abscissae12 absence13 abstract14 abstracter15 abstractor16 adiabatic17 aerobacter18 aerobic19 albacore20 alberich21 albrecht22 algebraic23 alphabetic24 ambiance25 ambuscade26 aminobenzoic27 anaerobic28 arabic29 athabascan30 auerbach31 diabetic32 diabolic33 drawback34 fabric35 fabricate36 flashback37 halfback38 iambic39 lampblack40 leatherback41 metabolic42 nabisco43 paperback44 parabolic45 playback46 prefabricate47 quarterback48 razorback49 roadblock50 sabbatical51 snapback52 strabismic53 syllabic54 tabernacle55 tablecloth

Prolog

Works with:SWI-Prolog

This code can be run at the Prolog top-level withmain(['unixdict.txt']) or in the shellswipl abc_words.pl unixdict.txt.

:-initialization(main,main).:-use_module(library(dcg/basics)).:-use_module(library(dcg/high_order)).abc_word-->string_without("abc",_),"a",string_without("bc",_),"b",string_without("c",_),"c",remainder(_).abc_word(ABCWord):-once(phrase(abc_word,ABCWord)).line_separated_words(Words)-->sequence(nonblanks,"\n",Words),blanks.main([Filename]):-phrase_from_file(line_separated_words(Words),Filename),include(abc_word,Words,ABCWords),length(ABCWords,Length),phrase(line_separated_words(ABCWords),ABCWordCodes),format("~d~n~s~n",[Length,ABCWordCodes]).
Output:
55abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Python

Outputs the same 55 words as other examples when entered in a Posix terminal shell

python-c'importsysforlninsys.stdin:if"a"inlnandln.find("a")<ln.find("b")<ln.find("c"):print(ln.rstrip())' < unixdict.txt

Or a functionally composed variant, with a predicate which takes a single recursive pass through the characters of each word:

'''ABC Words'''# isABC :: String -> BooldefisABC(s):'''True if s contains 'a', 'b' and 'c', with the       first occurrences of each in that order.    '''returnbind(bind(residue('bc','a')(s))(residue('c','b')))(lambdar:'c'inr)# residue (String, Char) -> String -> Maybe Stringdefresidue(disallowed,c):'''Any characters remaining in s after c, unless       c is preceded by excluded characters.    '''defgo(s):ifs:x=s[0]returnNoneifxindisallowedelse(s[1:]ifc==xelsego(s[1:]))else:returnNonereturngo# ------------------------- TEST -------------------------# main :: IO ()defmain():'''All words matching the isABC predicate       in a local copy of unixdict.txt    '''forxinenumerate(filter(isABC,readFile('unixdict.txt').splitlines()),start=1):print(x)# ----------------------- GENERIC ------------------------# bind (>>=) :: Maybe a -> (a -> Maybe b) -> Maybe bdefbind(m):'''Composition of a sequence of (a -> None | b) functions.       If m is None, it is passed straight through.       If m is x, the result is an application       of the (a -> None | b) function (mf) to x.    '''defgo(mf):returnmifNoneismelsemf(m)returngo# readFile :: FilePath -> IO StringdefreadFile(fp):'''The contents of any file at the path       derived by expanding any ~ in fp.    '''withopen(fp,'r',encoding='utf-8')asf:returnf.read()# MAIN ---if__name__=='__main__':main()
Output:
(1, 'aback')(2, 'abacus')(3, 'abc')(4, 'abdicate')(5, 'abduct')(6, 'abeyance')(7, 'abject')(8, 'abreact')(9, 'abscess')(10, 'abscissa')(11, 'abscissae')(12, 'absence')(13, 'abstract')(14, 'abstracter')(15, 'abstractor')(16, 'adiabatic')(17, 'aerobacter')(18, 'aerobic')(19, 'albacore')(20, 'alberich')(21, 'albrecht')(22, 'algebraic')(23, 'alphabetic')(24, 'ambiance')(25, 'ambuscade')(26, 'aminobenzoic')(27, 'anaerobic')(28, 'arabic')(29, 'athabascan')(30, 'auerbach')(31, 'diabetic')(32, 'diabolic')(33, 'drawback')(34, 'fabric')(35, 'fabricate')(36, 'flashback')(37, 'halfback')(38, 'iambic')(39, 'lampblack')(40, 'leatherback')(41, 'metabolic')(42, 'nabisco')(43, 'paperback')(44, 'parabolic')(45, 'playback')(46, 'prefabricate')(47, 'quarterback')(48, 'razorback')(49, 'roadblock')(50, 'sabbatical')(51, 'snapback')(52, 'strabismic')(53, 'syllabic')(54, 'tabernacle')(55, 'tablecloth')

Or using a regular expression.

importreimporttextwrapRE=re.compile(r"^([^bc\r\n]*a[^c\r\n]*b.*c.*)$",re.M)withopen("unixdict.txt")asfd:abc_words=RE.findall(fd.read())print(f"found{len(abc_words)} ABC words")print(textwrap.fill(" ".join(abc_words)))
Output:
found 55 ABC wordsaback abacus abc abdicate abduct abeyance abject abreact abscessabscissa abscissae absence abstract abstracter abstractor adiabaticaerobacter aerobic albacore alberich albrecht algebraic alphabeticambiance ambuscade aminobenzoic anaerobic arabic athabascan auerbachdiabetic diabolic drawback fabric fabricate flashback halfback iambiclampblack leatherback metabolic nabisco paperback parabolic playbackprefabricate quarterback razorback roadblock sabbatical snapbackstrabismic syllabic tabernacle tablecloth

Quackery

  [ true swap     behead swap    witheach       [ tuck < not if          [ dip not             conclude ] ]     drop ]               is ascending ( [ --> b )  [ [] swap     $ "abc" witheach      [ over find         swap dip join ]      size join     ascending ]         is abcword   ( $ --> b )   []   $ "rosetta/unixdict.txt" sharefile drop nest$  witheach     [ dup abcword iff        [ nested join ]      else drop ]   dup size echo say " words found." cr  70 wrap$
Output:
55 words found.aback abacus abc abdicate abduct abeyance abject abreact abscessabscissa abscissae absence abstract abstracter abstractor adiabaticaerobacter aerobic albacore alberich albrecht algebraic alphabeticambiance ambuscade aminobenzoic anaerobic arabic athabascan auerbachdiabetic diabolic drawback fabric fabricate flashback halfback iambiclampblack leatherback metabolic nabisco paperback parabolic playbackprefabricate quarterback razorback roadblock sabbatical snapbackstrabismic syllabic tabernacle tablecloth

R

library(stringi)library(dplyr)check_abc<-function(w){char_list<-stri_split_boundaries(w,type='character')[[1]]fpos<-lapply(c("a","b","c"),\(x)grep(x,char_list))%>%sapply(\(x)x[1])if(any(is.na(fpos)==T))return(F)ifelse(all(sort(fpos)==fpos),T,F)}rep<-sapply(readLines("unixdict.txt"),\(x)check_abc(x))print(names(rep[rep==T]))
Output:
[1] "aback"        "abacus"       "abc"          "abdicate"     "abduct"       "abeyance"     [7] "abject"       "abreact"      "abscess"      "abscissa"     "abscissae"    "absence"     [13] "abstract"     "abstracter"   "abstractor"   "adiabatic"    "aerobacter"   "aerobic"     [19] "albacore"     "alberich"     "albrecht"     "algebraic"    "alphabetic"   "ambiance"    [25] "ambuscade"    "aminobenzoic" "anaerobic"    "arabic"       "athabascan"   "auerbach"    [31] "diabetic"     "diabolic"     "drawback"     "fabric"       "fabricate"    "flashback"   [37] "halfback"     "iambic"       "lampblack"    "leatherback"  "metabolic"    "nabisco"     [43] "paperback"    "parabolic"    "playback"     "prefabricate" "quarterback"  "razorback"   [49] "roadblock"    "sabbatical"   "snapback"     "strabismic"   "syllabic"     "tabernacle"  [55] "tablecloth"

Racket

#langracket(for((i(in-naturals1))(w(filter(curryregexp-match#rx"^[^bc]*a[^c]*b.*c.*$")(file->lines"../../data/unixdict.txt"))))(printf"~a\t~a~%"iw))
Output:

Output is elided... it's the same list of words in every other implementation

1aback2abacus3abc4abdicate5abduct6abeyance7abject8abreact9abscess10abscissa11abscissae12absence...50sabbatical51snapback52strabismic53syllabic54tabernacle55tablecloth

Raku

putdisplay'unixdict.txt'.IO.words».fc.grep({ (.index('a')//next) < (.index('b')//next) < (.index('c')//next) }),     :11cols, :fmt('%-12s');subdisplay ($list, :$cols =10, :$fmt ='%6d', :$title ="{+$list} matching:\n" )   {cache$list;$title ~$list.batch($cols)».fmt($fmt).join:"\n"}
Output:
55 matching:aback        abacus       abc          abdicate     abduct       abeyance     abject       abreact      abscess      abscissa     abscissae   absence      abstract     abstracter   abstractor   adiabatic    aerobacter   aerobic      albacore     alberich     albrecht     algebraic   alphabetic   ambiance     ambuscade    aminobenzoic anaerobic    arabic       athabascan   auerbach     diabetic     diabolic     drawback    fabric       fabricate    flashback    halfback     iambic       lampblack    leatherback  metabolic    nabisco      paperback    parabolic   playback     prefabricate quarterback  razorback    roadblock    sabbatical   snapback     strabismic   syllabic     tabernacle   tablecloth


Rebol

Rebol[title:"Rosetta code: ABC words"file:%ABC_words.r3url:https://rosettacode.org/wiki/ABC_words];; Load or fetch the dictionaryunlessexists?%unixdict.txt[write%unixdict.txtreadhttps://raw.githubusercontent.com/thundergnat/rc-run/refs/heads/master/rc/resources/unixdict.txt]abc-word?:function[word][all[a:index?findword#"a"b:index?findword#"b"a<bc:index?findword#"c"b<c]]result:copy[]foreachwordread/lines%unixdict.txt[ifabc-word?word[appendresultword]]print["Found"as-yellowlength?result"ABC words:"]foreachwordresult[printword]
Output:
Found 55 ABC words:abackabacusabcabdicateabductabeyance...

REXX

This REXX version doesn't care what order the words in the dictionary are in,   nor does it care what
case  (lower/upper/mixed)  the words are in,   the search for the  ABC   words is  caseless.

It also allows the   (ABC)   characters to be specified on the command line (CL) as well as the dictionary file identifier.

/*REXX program finds all ABC words adhering to the specified letters */parseupperarglettersiFID='unixdict.txt'ParseUpperArglettersIfletters=''Thenletters='ABC'/*Not specified?  Then use the default.*/Doi=1tolength(letters)c.i=substr(letters,i,1)Endsayletters'words are:'num=0Dowhilelines(ifid)>0l=linein(ifid)p.1=pos(c.1,translate(l))Ifp.1>0ThenDoDoi=2Tolength(letters)ia=i-1p.i=pos(c.i,translate(l))Ifp.i<=p.iaThenleaveiEndIfi>length(letters)ThenSayformat(num,2)LEndEnd
output  when using the default input:
ABC words are: 1 aback 2 abacus 3 abc 4 abdicate 5 abduct 6 abeyance 7 abject 8 abreact 9 abscess10 abscissa11 abscissae12 absence13 abstract14 abstracter15 abstractor16 adiabatic17 aerobacter18 aerobic19 albacore20 alberich21 albrecht22 algebraic23 alphabetic24 ambiance25 ambuscade26 aminobenzoic27 anaerobic28 arabic29 athabascan30 auerbach31 diabetic32 diabolic33 drawback34 fabric35 fabricate36 flashback37 halfback38 iambic39 lampblack40 leatherback41 metabolic42 nabisco43 paperback44 parabolic45 playback46 prefabricate47 quarterback48 razorback49 roadblock50 sabbatical51 snapback52 strabismic53 syllabic54 tabernacle55 tablecloth
output  when using the  (vowels in order)  input:     aeiou
AEIOU words are: 1 adventitious 2 facetious

Ring

cStr = read("unixdict.txt")wordList = str2list(cStr)num = 0see "ABC words are:" + nlfor n = 1 to len(wordList)    bool1 = substr(wordList[n],"a")    bool2 = substr(wordList[n],"b")    bool3 = substr(wordList[n],"c")    bool4 = bool1 > 0 and bool2 > 0 and bool3 > 0    bool5 = bool2 > bool1 and bool3 > bool2    if bool4 = 1 and bool5 = 1       num = num + 1       see "" + num + ". " + wordList[n] + nl    oknext

Output:

ABC words are:1. aback2. abacus3. abc4. abdicate5. abduct6. abeyance7. abject8. abreact9. abscess10. abscissa11. abscissae12. absence13. abstract14. abstracter15. abstractor16. adiabatic17. aerobacter18. aerobic19. albacore20. alberich21. albrecht22. algebraic23. alphabetic24. ambiance25. ambuscade26. aminobenzoic27. anaerobic28. arabic29. athabascan30. auerbach31. diabetic32. diabolic33. drawback34. fabric35. fabricate36. flashback37. halfback38. iambic39. lampblack40. leatherback41. metabolic42. nabisco43. paperback44. parabolic45. playback46. prefabricate47. quarterback48. razorback49. roadblock50. sabbatical51. snapback52. strabismic53. syllabic54. tabernacle55. tablecloth

RPL

The only way in RPL to useunixdict.txt as input is to download it locally and to convert it into a list of 25,104 strings, stored in theUnixDict global variable. Fortunately, emulators can handle such a big data structure in RAM.

Works with:RPL version HP-49C
« { } "abc"IFUnixDict OVER POSTHEN +ELSE DROPEND@ speed up execution by reducing testing to words with 4+ characters  1UnixDict SIZEFOR j      'UnixDict' j GETCASE         DUP SIZE 4 <THEN DROPEND         DUP DUP2 3 →LIST { "a" "b" "c" } 2 « POS » DOLIST         DUP 1 GET NOTTHEN DROP2END         2 « < » DOSUBS EVAL * NOTTHEN DROPEND         +ENDNEXT» 'TASK' STO

Ruby

translation from Perl

putsFile.open("unixdict.txt").grep(/^[^bc]*a[^c]*b.*c/)
Output:

Same 55 words

abackabacusabcabdicateabductabeyanceabjectabreactabscess...quarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Rust

usestd::fs;fnisabcword(word:&&str)->bool{letpositions=['a','b','c'].iter().filter_map(|c|word.find(*c)).collect::<Vec<usize>>();returnpositions.len()==3&&positions.windows(2).all(|w|w[0]<=w[1]);}fnmain(){letwordsfile=fs::read_to_string("unixdict.txt").unwrap().to_lowercase();letwords=wordsfile.split_whitespace().filter(|w|isabcword(w));for(i,w)inwords.enumerate(){print!("{:<14}{}",w,if(i+1)%6==0{"\n"}else{""});}return();}
Output:
aback         abacus        abc           abdicate      abduct        abeyance      abject        abreact       abscess       abscissa      abscissae     absence       abstract      abstracter    abstractor    adiabatic     aerobacter    aerobic       albacore      alberich      albrecht      algebraic     alphabetic    ambiance      ambuscade     aminobenzoic  anaerobic     arabic        athabascan    auerbach      diabetic      diabolic      drawback      fabric        fabricate     flashback     halfback      iambic        lampblack     leatherback   metabolic     nabisco       paperback     parabolic     playback      prefabricate  quarterback   razorback     roadblock     sabbatical    snapback      strabismic    syllabic      tabernacle    tablecloth

Rye

Works with:Rye version 0.1.01
Read\lines %unixdict.txt|filter { .intersection "abc" |= "abc" }|for ?print
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

sed

$ sed '/^[^abc]*a[^bc]*b[^c]*c/!d' unixdict.txt   abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Seed7

$ include "seed7_05.s7i";const func boolean: isABC (in string: word) is func  result    var boolean: abc is FALSE;  local    var integer: a is 0;    var integer: b is 0;    var integer: c is 0;  begin    a := pos(word, 'a');    b := pos(word, 'b');    c := pos(word, 'c');    abc := a > 0 and b > a and c > b;  end func;const proc: main is func  local    var file: dictionary is open("unixdict.txt", "r");    var string: word is "";  begin    while not eof(dictionary) do      readln(dictionary, word);      if isABC(word) then        write(word & " ");      end if;    end while;    close(dictionary);  end func;
Output:
aback abacus abc abdicate abduct abeyance abject abreact abscess abscissa abscissae absence abstract abstracter abstractor adiabatic aerobacter aerobic albacore alberich albrecht algebraic alphabetic ambiance ambuscade aminobenzoic anaerobic arabic athabascan auerbach diabetic diabolic drawback fabric fabricate flashback halfback iambic lampblack leatherback metabolic nabisco paperback parabolic playback prefabricate quarterback razorback roadblock sabbatical snapback strabismic syllabic tabernacle tablecloth

Swift

importFoundationfuncloadDictionary(_path:String)throws->[String]{letcontents=tryString(contentsOfFile:path,encoding:String.Encoding.ascii)returncontents.components(separatedBy:"\n")}funcisAbcWord(_word:String)->Bool{vara=falsevarb=falseforchinword{switch(ch){case"a":if!a{a=true}case"b":if!b{if!a{returnfalse}b=true}case"c":returnbdefault:break}}returnfalse}do{letdictionary=tryloadDictionary("unixdict.txt")varn=1forwordindictionary{ifisAbcWord(word){print("\(n):\(word)")n+=1}}}catch{print(error)}
Output:
1: aback2: abacus3: abc4: abdicate5: abduct6: abeyance7: abject8: abreact9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

Tcl

procis_abc_wordword{regexp{^[^bc]*a[^c]*b.*c}$word}setres[lmapw[read[openunixdict.txt]]{if{[is_abc_word$w]}{setw}elsecontinue}]puts"Found [llength $res] words:"puts[join$res\n]
Output:
$ tclsh abc_words.tclFound 55 words:abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth

Transd

#langtransdMainModule:{_start:(lambda(withfsFileStream()(open-rfs"/mnt/tmp/unixdict.txt"))(forwin(read-linesfs)do(if(matchw"^[^bc]*a[^c]*b.*c.*")(loutw)))))}
Output:
abackabacusabc... 55 words in total ...syllabictabernacletablecloth

uBasic/4tH

IfSet(a,Open("unixdict.txt","r"))<0ThenPrint"Cannot open \qunixdict.txt\q":EndDoWhileRead(a)c=Ord("a")Fori=0toLen(Set(w,Tok(0)))-1t=Peek(w,i))Until(t<Ord("d"))*(t>c)Ift=cThenIfSet(c,c+1)=Ord("d")ThenPrintShow(w):BreakNextLoopCloseaEnd

Uiua

⊜□⊸≠@\n&fras "unixdict.txt"▽⊸≡◇(≍0_1_2◴▽⊸<₃⨂"abc")
Output:
["aback"│"abacus"│"abc"│"abdicate"│"abduct"│"abeyance"│"abject"│"abreact"│"abscess"│"abscissa"│"abscissae"│"absence"│"abstract"│"abstracter"│"abstractor"│"adiabatic"│"aerobacter"│"aerobic"│"albacore"│"alberich"│"albrecht"│"algebraic"│"alphabetic"│"ambiance"│"ambuscade"│"aminobenzoic"│"anaerobic"│"arabic"│"athabascan"│"auerbach"│"diabetic"│"diabolic"│"drawback"│"fabric"│"fabricate"│"flashback"│"halfback"│"iambic"│"lampblack"│"leatherback"│"metabolic"│"nabisco"│"paperback"│"parabolic"│"playback"│"prefabricate"│"quarterback"│"razorback"│"roadblock"│"sabbatical"│"snapback"│"strabismic"│"syllabic"│"tabernacle"│"tablecloth"]


V (Vlang)

import osfn main() {    mut count := 1    mut text :=''    unixdict := os.read_file('./unixdict.txt') or {println('Error: file not found') exit(1)}    for word in unixdict.split_into_lines() {        if word.contains('a')         && word.index_any('a') < word.index_any('b')         && word.index_any('b') < word.index_any('c') {            text += count++.str() + ': $word \n'        }    }    println(text)}
Output:
1: aback2: abacus3: abc4: abdicate5: abduct6: abeyance7: abject8: abreact9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

Wren

Library:Wren-fmt
import"io"forFileimport"./fmt"forFmtvarwordList="unixdict.txt"// local copyvarwords=File.read(wordList).trimEnd().split("\n")varcount=0System.print("Based on first occurrences only, the ABC words in%(wordList) are:")for(wordinwords){vara=word.indexOf("a")varb=word.indexOf("b")varc=word.indexOf("c")if(a>=0&&b>a&&c>b){count=count+1Fmt.print("$2d: $s",count,word)}}
Output:
Based on first occurrences only, the ABC words in unixdict.txt are: 1: aback 2: abacus 3: abc 4: abdicate 5: abduct 6: abeyance 7: abject 8: abreact 9: abscess10: abscissa11: abscissae12: absence13: abstract14: abstracter15: abstractor16: adiabatic17: aerobacter18: aerobic19: albacore20: alberich21: albrecht22: algebraic23: alphabetic24: ambiance25: ambuscade26: aminobenzoic27: anaerobic28: arabic29: athabascan30: auerbach31: diabetic32: diabolic33: drawback34: fabric35: fabricate36: flashback37: halfback38: iambic39: lampblack40: leatherback41: metabolic42: nabisco43: paperback44: parabolic45: playback46: prefabricate47: quarterback48: razorback49: roadblock50: sabbatical51: snapback52: strabismic53: syllabic54: tabernacle55: tablecloth

XPL0

string  0;              \use zero-terminated stringsint     I, J, K, Ch, Len;char    Word(100);      \(longest word in unixdict.txt is 22 chars)def     LF=$0A, CR=$0D, EOF=$1A;[FSet(FOpen("unixdict.txt", 0), ^I);    \open dictionary and set it to device 3OpenI(3);repeat  I:= 0;        loop    [repeat Ch:= ChIn(3) until Ch # CR;     \remove possible CR                if Ch=LF or Ch=EOF then quit;                Word(I):= Ch;                I:= I+1;                ];        Word(I):= 0;                    \terminate string        Len:= I;        for I:= 0 to Len-1 do            if Word(I)=^a then                [for J:= 0 to Len-1 do                    if Word(J)=^b then                        [for K:= 0 to Len-1 do                            if Word(K)=^c then                                [if K>J & J>I then                                    [Text(0, Word);  CrLf(0)];                                K:= Len;                                ];                        J:= Len;                        ];                I:= Len;                ];until   Ch = EOF;]
Output:
abackabacusabcabdicateabductabeyanceabjectabreactabscessabscissaabscissaeabsenceabstractabstracterabstractoradiabaticaerobacteraerobicalbacorealberichalbrechtalgebraicalphabeticambianceambuscadeaminobenzoicanaerobicarabicathabascanauerbachdiabeticdiabolicdrawbackfabricfabricateflashbackhalfbackiambiclampblackleatherbackmetabolicnabiscopaperbackparabolicplaybackprefabricatequarterbackrazorbackroadblocksabbaticalsnapbackstrabismicsyllabictabernacletablecloth
Retrieved from "https://rosettacode.org/wiki/ABC_words?oldid=396178"
Categories:
Hidden category:
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

[8]ページ先頭

©2009-2026 Movatter.jp