I need to remove some substrings in strings (in a large dataset). The substrings often contain special characters, like these: ., ^, /,... and replaceAll() would treat them as special characters for regex, such as a dot would match any character, which is not really what I want.
Is there other functions to do the "replace" without treating the first argument as regex?
Just use String.replace(). It functions the same way, but it deals with escaping the special characters internally to avoid you having to worry about regex.