replace % in pattern with .* and surround with ^$ to get a real regex pattern