implemented regexp subst string compiler