fix inefficient regex that filtered in AMR graphs