@Override
		protected FieldRange findInLine(int start, BigInteger index) {
			Matcher matcher = pattern.matcher(sb);
			int length = sb.length();
			if (length == 0) {
				return null;
			}
			start = Math.min(length - 1, start);
			if (forward) {
				for (int i = start; i < length && matcher.find(i);) {
					if (!wholeWord || isWholeWord(i, matcher.group())) {
						return new FieldRange(
							new FieldLocation(index, 0, 0, matcher.start()),
							new FieldLocation(index, 0, 0, matcher.end()));
					}
					i = matcher.start() + 1;
				}
				return null;
			}
			int lastStart = -1;
			int lastEnd = -1;
			for (int i = 0; i <= start && matcher.find(i);) {
				if (!wholeWord || isWholeWord(i, matcher.group())) {
					if (matcher.start() > start) {
						break;
					}
					lastStart = matcher.start();
					lastEnd = matcher.end();
				}
				i = matcher.start() + 1;
			}
			if (lastStart == -1) {
				return null;
			}
			return new FieldRange(
				new FieldLocation(index, 0, 0, lastStart),
				new FieldLocation(index, 0, 0, lastEnd));
		}
@see TerminalPanel#find(String, Set, FieldLocation, boolean)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalFinder.java