title: Java replaceAll Illegal repetition
body: <p>I have a big json stored in a string. I want to change some part of the String and I get this error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.util.regex.PatternSyntaxException:
    Illegal repetition near index 6
        "date":{"nil":"true"}
              ^
          at java.util.regex.Pattern.error(Pattern.java:1924)
          at java.util.regex.Pattern.closure(Pattern.java:3104)
          at java.util.regex.Pattern.sequence(Pattern.java:2101)
          at java.util.regex.Pattern.expr(Pattern.java:1964)
          at java.util.regex.Pattern.compile(Pattern.java:1665)
          at java.util.regex.Pattern.(Pattern.java:1337)
          at java.util.regex.Pattern.compile(Pattern.java:1022)
          at java.lang.String.replaceAll(String.java:2162)
          at basari.process.MsisdnProcess.setAllPropTypes(MsisdnProcess.java:51)
          at testClass.MainTest.main(MainTest.java:98)</p>
  </blockquote>
  
  <p>My code: </p>
  
  <pre><code>String example =  "deviceInfo":{"deviceBrand":"NOKIA","imei":"11111111","deviceModel":"6300","date":{"nil":"true"}}
  
  example.replaceAll( "\"date\":{\"nil\":\"true\"}", "\"date\":\"2014-08-14T10:00:00.000+02:00\"");
  </code></pre>