private byte getMask(String tok) {
		char c1 = tok.charAt(0);
		char c2 = tok.charAt(1);
		int index1 = WILD_CARDS.indexOf(c1);
		int index2 = WILD_CARDS.indexOf(c2);
		if (index1 >= 0 && index2 >= 0) {
			return (byte) 0x00;
		}
		if (index1 >= 0 && index2 < 0) {
			return (byte) 0x0F;
		}
		if (index1 < 0 && index2 >= 0) {
			return (byte) 0xF0;
		}
		return (byte) 0xFF;
	}
Returns the search mask for the given hex byte string.  Normal hex digits result
in a "1111" mask and wildcard digits result in a "0000" mask.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/format/HexSearchFormat.java