Pangram checker: Difference between revisions

Content added Content deleted
m (Someone doesn't know their alphabet lol!!! (examples not in alphabetical order!!))
Line 1,691: Line 1,691:
puts [pangram? "This is a sentence"]; # ==> false
puts [pangram? "This is a sentence"]; # ==> false
puts [pangram? "The quick brown fox jumps over the lazy dog."]; # ==> true</lang>
puts [pangram? "The quick brown fox jumps over the lazy dog."]; # ==> true</lang>

=={{header|TXR}}==
<lang txr>@/.*[Aa].*&.*[Bb].*&.*[Cc].*&.*[Dd].*& \
.*[Ee].*&.*[Ff].*&.*[Gg].*&.*[Hh].*& \
.*[Ii].*&.*[Jj].*&.*[Kk].*&.*[Ll].*& \
.*[Mm].*&.*[Nn].*&.*[Oo].*&.*[Pp].*& \
.*[Qq].*&.*[Rr].*&.*[Ss].*&.*[Tt].*& \
.*[Uu].*&.*[Vv].*&.*[Ww].*&.*[Xx].*& \
.*[Yy].*&.*[Zz].*/</lang>

{{out|Run}}
<pre>$ echo "The quick brown fox jumped over the lazy dog." | txr is-pangram.txr -
$echo $? # failed termination
1
$ echo "The quick brown fox jumped over the lazy dogs." | txr is-pangram.txr -
$ echo $? # successful termination
0</pre>


=={{header|TUSCRIPT}}==
=={{header|TUSCRIPT}}==
Line 1,730: Line 1,713:
no pangram: the quick brown fox falls over the lazy dog
no pangram: the quick brown fox falls over the lazy dog
</pre>
</pre>

=={{header|TXR}}==
<lang txr>@/.*[Aa].*&.*[Bb].*&.*[Cc].*&.*[Dd].*& \
.*[Ee].*&.*[Ff].*&.*[Gg].*&.*[Hh].*& \
.*[Ii].*&.*[Jj].*&.*[Kk].*&.*[Ll].*& \
.*[Mm].*&.*[Nn].*&.*[Oo].*&.*[Pp].*& \
.*[Qq].*&.*[Rr].*&.*[Ss].*&.*[Tt].*& \
.*[Uu].*&.*[Vv].*&.*[Ww].*&.*[Xx].*& \
.*[Yy].*&.*[Zz].*/</lang>

{{out|Run}}
<pre>$ echo "The quick brown fox jumped over the lazy dog." | txr is-pangram.txr -
$echo $? # failed termination
1
$ echo "The quick brown fox jumped over the lazy dogs." | txr is-pangram.txr -
$ echo $? # successful termination
0</pre>


=={{header|UNIX Shell}}==
=={{header|UNIX Shell}}==