Note that there are some explanatory texts on larger screens.

plurals
  1. PORegex gives error
    text
    copied!<p>Continuing with the post at <a href="https://stackoverflow.com/questions/705672/regular-expression-to-allow-a-set-of-characters-and-disallow-others/705990#705990">Regular expression to allow a set of characters and disallow others</a></p> <p>Does anybody know why the below would occur?</p> <p>I get the below error when I create a regular expression as:</p> <pre><code>[^@*–’”“\r\nœçsÇSgGšcrŠRNEŽDTCnežuUIti—¿„”]+ </code></pre> <p>and enter any of these restricted characters in the input field</p> <pre><code>java.lang.ArrayIndexOutOfBoundsException at org.apache.regexp.RECompiler$RERange.delete(RECompiler.java:1326) at org.apache.regexp.RECompiler$RERange.remove(RECompiler.java:1417) at org.apache.regexp.RECompiler$RERange.include(RECompiler.java:1459) at org.apache.regexp.RECompiler$RERange.include(RECompiler.java:1470) at org.apache.regexp.RECompiler.characterClass(RECompiler.java:699) at org.apache.regexp.RECompiler.terminal(RECompiler.java:863) at org.apache.regexp.RECompiler.closure(RECompiler.java:942) at org.apache.regexp.RECompiler.branch(RECompiler.java:1151) at org.apache.regexp.RECompiler.expr(RECompiler.java:1203) at org.apache.regexp.RECompiler.compile(RECompiler.java:1281) at org.apache.regexp.RE.(RE.java:495) at org.apache.regexp.RE.(RE.java:480) </code></pre> <p>but this expression works perfectly fine</p> <pre><code>[^@*–’”“\r\nœçsÇSgGšcrŠRN]+ </code></pre> <p>Also,</p> <pre><code>[^@*–’”“\r\nœçsÇSgGšcrŠR„”]+ </code></pre> <p>works but</p> <pre><code>[^@*–’”“\r\nœçsÇSgGšcrŠRNE]+ </code></pre> <p>does not work and gives the above error.</p> <p>Is there a limit to the number of characters that can be disallowed like the way above?</p> <p>Regards, Udit Sud</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload