private boolean areAllCharactersSimpleEnough(String s) {
		for (int i = 0; i < s.length(); i++) {
			char c = s.charAt(i);
			if (c >= 0x20 && c <= 0x5A) {
				// 'Space' through upper-case Z
				continue;
			}

			if (c >= 0x5F && c <= 0x7A) {
				// 'Underscore' through lower-case z
				continue;
			}

			return false;
		}
		return true;
	}
A text filter that uses a pattern and performs a 'find' using that pattern.
Ghidra/Framework/Docking/src/main/java/docking/widgets/filter/FindsPatternTextFilter.java