fix inefficient regex that filtered in AMR graphs

also remove unused swing import to remove dependency on
swing