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 s
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.