public static Pattern createSearchPattern(String input, boolean caseSensitive) {

		int options = 0;
		if (!caseSensitive) {
			options |= Pattern.CASE_INSENSITIVE;
		}

		Pattern p = createPattern(input, true, options);
		return p;
	}
<b>
Note: this is the default model of how to let users search for things in Ghidra.  This
is NOT a tool to allow regex searching, but instead allows users to perform searches while
using familiar globbing characters such as '*' and '?'.
</b>
<p>
This method can be used with {@link Matcher#matches()} or {@link Matcher#find()}.
<p>
Create a regular expression from the given input. <b>Note:</b> the regular expression
created by this method is not a pure regular expression.  More specifically, many
regular expression characters passed to this method will be escaped
(see {@link #escapeAllRegexCharacters(String)}.
<p>
Also, globbing characters
<b><u>will</u></b> be changed from a regular expression meaning to a
command-line style glob meaning.

<p>
<b>Note: </b>This method <b>will</b> escape regular expression
characters, such as:
<ul>
<li>?</li>
<li>.</li>
<li>$</li>
<li>...and many others</li>
</ul>
Thus, this method is not meant to <b>accept</b> regular expressions, but
rather <b>generates</b> regular expressions.

@param input
           string to create a regular expression from
@param caseSensitive
           true if the regular expression is case sensitive
@return Pattern the compiled regular expression
@throws java.util.regex.PatternSyntaxException
            if the input could be compiled
Ghidra/Framework/Utility/src/main/java/ghidra/util/UserSearchUtils.java