So I have read 2 strings from an xml file. The xml string is:
<regex code="bla[. ]?(.*)\n" replacement="cpe_ip_learning_table:\\n$1\\n "/>
This reads into two separate variables for a replaceAll call. i.e:
str = str.replaceAll(code, replacement);
However, even when I try a \n as a replacement instead of a \\n it still does not insert a newline.
I am using a DOM DocumentBuilder to read the XML file into two separate strings. I have tried using Matcher.quoteReplacement as well to no avail. Has anyone run into this issue and how have they solved it?