I have this code snippet of a code base I am supposed to maintain.
String number = "1";
String value = "test";
String output = "";
output = value.replaceAll("\\Q{#}", number);
The value of output stays as "test" and I can only guess what this code is supposed to do: the value of numbershould be appended to whatever is in value. Maybe something like this: test1 or replace the value with the number entirely.
I found out that \\Q is the regex option to quote everything until \\E but there is no \\E. Anyway it is not doing anything at all and I am wondering if I oversee something?