Jump to content

ABC words: Difference between revisions

Add Tcl version
(Add Tcl version)
Line 1,257:
55: tablecloth
</pre>
 
=={{header|Tcl}}==
<lang tcl>proc is_abc_word word {
regexp {^[^bc]*a[^c]*b.*c} $word
}
 
set res [lmap w [read [open unixdict.txt]] {
if {[is_abc_word $w]} {set w} else continue
}]
 
puts "Found [llength $res] words:"
puts [join $res \n]</lang>
{{out}}
<pre>$ tclsh abc_words.tcl
Found 55 words:
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</pre>
 
=={{header|Wren}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.