private String convertPathGlobingToRegEx(String s) {
		// Path globbing uses "**" to match any number of namespace elements in the symbol path
		// Valid examples of path globbing are "a::**::b", "**::a", or "a::**". 
		//
		// In order to handle the case where it matches zero path elements ("a::**::b" should
		// match "a::b"), we need to remove either the starting delimiter or the ending delimiter.
		// Also note that we are doing this replacement after all "::" have been replaced by spaces.

		// First replace " ** " with a regex pattern that matches either: a space followed by one
		// or more characters followed by another space; or a single space. The second case
		// handles when the ** matches zero elements such as "a::**::b" matches "a::b".
		s = s.replaceAll(" \\*\\* ", "( .* | )");

		// If the string starts with "** ", replace it with the regex pattern that matches either:
		// anything followed by a space; or nothing at all.
		s = s.replaceAll("^\\*\\* ", "(.* |)");

		// If the string ends with " **", replace it with the regex pattern that matches a space
		// followed by anything.
		s = s.replaceAll(" \\*\\*$", " .*");

		// Finally, any other "**", not handled is considered a mistake and is treated as if a
		// single start was entered, which is mapped to the regex expression any number of 
		// non-space characters.
		s = s.replaceAll("\\*\\*", "[^ ]*");
		return s;
	}
Class for matching symbol names with or without namespace paths and wildcards.
Ghidra/Features/Base/src/main/java/ghidra/app/util/navigation/SymbolMatcher.java