Adding iterative solution of wildcard matching