private static boolean isModuleDependencyJar(String pathName) {

		if (ClassSearcher.SEARCH_ALL_JARS) {
			return true; // this will search all jar files
		}

		// Note: the path is expected to be using forward slashes
		Matcher matcher = ANY_MODULE_LIB_JAR_FILE_PATTERN.matcher(pathName);
		if (!matcher.matches()) {
			return false;
		}

		String moduleName = matcher.group(1);
		String jarName = matcher.group(2);

		// handle a name match, as well as an extension jar (e.g., /Base/lib/Base_ext.jar)
		return jarName.startsWith(moduleName);
	}
Pattern for matching jar files in a module lib dir
<p>
The pattern roughly states to accept any path that contains {@code lib} or 
{@code build/libs}, ending in {@code .jar} (non-capturing) and then 
grab that dir's parent and the name of the jar file.
Ghidra/Framework/Generic/src/main/java/ghidra/util/classfinder/ClassJar.java