added demo_str_rule() to examples
added a (previously tried but commented out) optimization if min_acc not given