title: java.util.regex.PatternSyntaxException: Illegal character range near index 71
body: <p>[^\u0009\u000A\u000D\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF]</p>
  
  <p>The above line showing illegal character range exception. Can anyone please help me.</p>
  
  <p>if i use the above line in java code directly, it is not showing any error.</p>
  
  <pre><code>Pattern xmlInvalidChars = Pattern.compile("[^\\u0009\\u000A\\u000D\\u0020-\\uD7FF\\uE000-\\uFFFD\uD800\uDC00-\uDBFF\uDFFF]");
  </code></pre>
  
  <p>But if get the string from configuration xml file and use in the java code, it is showing error.</p>
  
  <pre><code>String chars = ConfigLoader.getInstance().getInvalidCharacters();
  Pattern xmlInvalidChars = Pattern.compile(chars);
  </code></pre>