function M = pref2dfsa(str,alf) G = [str setstar(alf)]; M = gregexp2dfsa_fast(G,alf); return