private static void forMatchUnmatch(String str, Pattern pat, Consumer<String> matched,
			Consumer<String> unmatched) {
		int startU = 0;
		Matcher mat = pat.matcher(str);
		while (mat.find()) {
			if (startU < mat.start()) {
				unmatched.accept(str.substring(startU, mat.start()));
			}
			matched.accept(mat.group());
			startU = mat.end();
		}
		if (startU < str.length()) {
			unmatched.accept(str.substring(startU));
		}
	}
Split the given string into pieces matched by the pattern, and the pieces between

<p>
This invokes the given callbacks as the string is processed from left to right.

@param str the string to split
@param pat the pattern to match
@param matched the callback for matched portions
@param unmatched the callback for unmatched portions
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/grammars/AssemblySentential.java