There is another thing with replaceAll(). Using it with regex is searching/replacing in a caseSensitive way - ever.
So wholeWord = false and caseSensitive = false and regex = true - that's where I found this issue.
I used this string:
"How much wood would a WOODCHUCK chuck, if a woodchuck COULD CHUCK wood?"
The regex is ".ould" the replacement is "XXXXX"
Find/Replace make this:
"How much wood XXXXX a WOODCHUCK chuck, if a woodchuck XXXXX CHUCK wood?"
ReplaceAll makes this:
"How much wood XXXXX a WOODCHUCK chuck, if a woodchuck COULD CHUCK wood?"
I expect them to be the same ..
I did it with caseSensitive = true and that worked fine.
I would expect that replaceAll and find/replace and markAll have the same results AND if I'd use them with caseSensitive = true in this example it would only find/replace/mark one match (that is already fine) and if I'd use them with caseSensitive = false it would find/replace/mark two ones.
So the thing is that replaceAll is ever caseSensitive.
Notice that this is only about using these methods with regex :)