Interesting, but unfortunally, a bit slow.
grep rocks when it comes to speed:
#!/bin/sh
FILE=/home/abigail/Words/enable.lst
PATTERNS="
abc
sch[ae]
.*a.*e.*i.*o.*u.*
^[[:xdigit:]]+$
(a|b)(c|d)(e|f)
"
PROGRAMS=("/bin/grep -E" ./grepp)
OUTPUT=(/tmp/grep.out /tmp/grepp.out)
i=0
while [ $i -lt ${#PROGRAMS[*]} ]
do echo -n ${PROGRAMS[$i]}
time for pat in $PATTERNS
do ${PROGRAMS[$i]} $pat $FILE
done > ${OUTPUT[$i]}
i=$((i + 1))
done
i=1
while [ $i -lt ${#OUTPUT[*]} ]
do diff ${OUTPUT[0]} ${OUTPUT[$i]}
i=$((i + 1))
done
rm -f ${OUTPUT[*]}
/bin/grep -E
real 0m0.070s
user 0m0.060s
sys 0m0.010s
./grepp
real 0m2.774s
user 0m2.610s
sys 0m0.030s
Abigail