Github user mosermw commented on a diff in the pull request: https://github.com/apache/nifi/pull/2748#discussion_r193230207 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestReplaceText.java --- @@ -81,15 +81,16 @@ public void testSimple() throws IOException { @Test public void testWithEscaped$InReplacement() throws IOException { final TestRunner runner = getRunner(); - runner.setProperty(ReplaceText.SEARCH_VALUE, "(?s:^.*$)"); + //runner.setProperty(ReplaceText.SEARCH_VALUE, "(?s:^.*$)"); + runner.setProperty(ReplaceText.SEARCH_VALUE, "(?s)(^.*$)"); runner.setProperty(ReplaceText.REPLACEMENT_VALUE, "a\\$b"); runner.enqueue("a$a,b,c,d"); runner.run(); runner.assertAllFlowFilesTransferred(ReplaceText.REL_SUCCESS, 1); final MockFlowFile out = runner.getFlowFilesForRelationship(ReplaceText.REL_SUCCESS).get(0); - out.assertContentEquals("a\\$b".getBytes("UTF-8")); + out.assertContentEquals("a$b".getBytes("UTF-8")); --- End diff -- Was this is a change in the way that ReplaceText behaves or was this unit test incorrect before? Is there a way to obtain t he output "a\$b" from ReplaceText now?
---