That's a really good question. It definitely doesn't have to do with length.
Edit: It has to do with having a back slash at the end of the string. Remove it and you will see what I mean. [ July 01, 2004: Message edited by: Darin Niard ]
I'm not sure what's going on, but note that the documentation for replaceAll() tells us (if you follow the link to the Matcher class' method) that the replacement string is not treated literally, and backslashes have special meaning as escape characters - which is probalby not what you want. So you probably need to again double (that is, quadruple) each \ in your preplacement string literal, to get:
String APP_ROOT = "C:\\\\Documents and Settings\\\\SysOp\\\\My Documents\\\\AB LOGIC\\\\Eclipse Workspace\\\\abLogic\\\\web\\\\";
Strange, I know, but it should work. I bet it was the final \\ in the original string that caused the problem - the compiler translated that to a single \, and the regex parser saw that single \ and figured it was an escape for the following character. Except there was no following character, so it got confused.
Notice that the same is true for '$'. That's why I have written a method for escaping replace values, which goes something like (IIRC - the following is from memory, and therefore untested):
Please note: by writing the code like that, you are possibly breaking portability. For HTML strings, instead of escaping double quotes, you may use single quotes.
Post by:autobot
Everyone is a villain in someone else's story. Especially this devious tiny ad:
a bit of art, as a gift, the permaculture playing cards