cosmo match hdr

function msk = cosmo_match(haystack, needle, varargin)