@Override
	public ByteMatcher parse(String input, SearchSettings settings) {
		input = input.trim();
		if (input.isBlank()) {
			return new InvalidByteMatcher("");
		}

		boolean isBigEndian = settings.isBigEndian();
		int inputLength = input.length();
		Charset charset = settings.getStringCharset();
		if (charset == StandardCharsets.UTF_16) {
			charset = isBigEndian ? StandardCharsets.UTF_16BE : StandardCharsets.UTF_16LE;
		}
		// Escape sequences in the "input" are 2 Characters long.
		String converted = input;
		if (settings.useEscapeSequences() && inputLength >= 2) {
			converted = StringUtilities.convertEscapeSequences(input);
		}
		byte[] bytes = converted.getBytes(charset);
		byte[] maskArray = new byte[bytes.length];
		Arrays.fill(maskArray, (byte) 0xff);

		if (!settings.isCaseSensitive()) {
			createCaseInsensitiveBytesAndMasks(charset, bytes, maskArray);
		}

		return new MaskedByteSequenceByteMatcher(input, bytes, maskArray, settings);
	}
{@link SearchFormat} for parsing and display bytes in a string format. This format uses
several values from SearchSettings included character encoding, case sensitive, and escape
sequences.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/format/StringSearchFormat.java