An automaton cache added to regular expressions