static boolean secondaryAttributeMatches(String secondaryKey, String constraint) {
		if (constraint == null) {
			return false;
		}

		int secondaryKeyInt;
		try {
			secondaryKeyInt = Integer.parseInt(secondaryKey);
		}
		catch (NumberFormatException e) {
			return false;
		}

		constraint = constraint.replaceAll("[_\\s]+", "").trim().toLowerCase();
		if (constraint.startsWith("0x")) { // Hex constraint string
			try {
				int hexConstraint = Integer.parseUnsignedInt(constraint.substring(2), 16);
				return secondaryKeyInt == hexConstraint;
			}
			catch (NumberFormatException e) {
				// fall thru, return false
			}
			return false;
		}
		else if (constraint.startsWith("0b")) { // Binary constraint string
			String secondaryKeyBinaryString = Integer.toBinaryString(secondaryKeyInt);
			secondaryKeyBinaryString = StringUtils.leftPad(secondaryKeyBinaryString, 32, "0");

			String constraintBinaryString = StringUtils.leftPad(constraint.substring(2), 32, "0");
			for (int i = 0; i < 32; i++) {
				char c = constraintBinaryString.charAt(i);
				if (c == '.') { // wildcard
					continue;
				}

				if (secondaryKeyBinaryString.charAt(i) != c) {
					return false;
				}
			}
			return true;
		}
		return false;
	}
Match a secondaryKey value string against a binary or hex formatted constraint.
<p>
The constraint value needs to be patterned as:
<li>Binary: "0b1110_0001 111..." (spaces and "_" ignored, dots are wildcards)
<li>Hex: "0xaabb_ccdd" (hex digits, spaces and "_" ignored)

@param secondaryKey decimal integer string that is being searched for
@param constraint value or pattern that the secondaryKey is being compared against
@return boolean true if the secondaryKey matches the constraint; false if it doesn't match
or if the constraint isn't a binary or hex constraint, or if the secondaryKey value isn't
an integer
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/QueryOpinionService.java