12 Replies Latest reply on Feb 24, 2007 6:10 PM by 807606

    Substring error with ( or  )

    807606
      Hi, i'm trying to do a substring in a string.. using:
      txt.replaceAll(":(", "SAD");
      but get an error
      "Exception in thread "AWT-EventQueue-0" java.util.regex.PatternSyntaxException: Unclosed group near index 2
      :("
      or when i use:
      txt.replaceAll(":(", "HAPPY");
      I get the error:
      "Unmatched closing ')' near index 0 :)"