Can one automatically get Intellij's regex assistance for one's own regex parameters
<p>Intellij provides regex &quot;assistance&quot; (syntax checking) for parameters that expect regular expressions, eg coding:</p>
<pre><code>String[] array = string.split(&quot;(*.&quot;);
</code></pre>
<p>will mark an error under the regex and provide a tool tip error:</p>
<blockquote>
<p>Unclosed group</p>
</blockquote>
<p>This also works for variables, eg</p>
<pre><code>String myVar = &quot;(*.&quot;; // shows above error here
String[] array = string.split(myVar);
</code></pre>
<p>But if I create my own method that expects a regex, I don't get this assistance, eg:</p>
<pre><code>String[] myMethod(String regexParameter) {
    return someString.split(regexParameter);
}

myMethod(&quot;(*.&quot;); // no &quot;error&quot; marker like above
</code></pre>
<p>Although Intellij can figure out <code>regexParameter</code> should be a valid regex, it doesn't check it like it does for JDK parameters.</p>
<p>How do I get regex assistance for my own method parameters?</p>
<hr />
<h3>Note:</h3>
<p>Ideally there would be an annotation-based solution or similar, where the method's parameters are &quot;defined&quot; to Intellij as being regex, so all developers automatically get the assistance when they load up the code base.</p>