Ok, a minor update on the matcher is attached. Usage example (with German sugar):
| alphabet values matcher |
values := Dictionary new.
alphabet := #($a $b $c $d $e $f $g $h $i $j $k $l $m $n $o $p $q $r $s $t $u $v $w $x $y $z $ä $ö $ü $ß).
alphabet
with: (1 to: alphabet size)
do: [:letter :value | values at: letter put: value].
matcher := DollarMatcher new.
matcher
dollar: 100;
string: 'I have found the dollars';
values: values;
match
Ok, one last thing. Please consider in usage that the number of matches in a string is approximately 2 power string length - so runtime will be exponential. In the example above it is 22442 - including duplicates.
Ciao, Steffen
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen.
http://www.pc-sicherheit.web.de/startseite/?mc=022220_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc