[Replace]Different behavior of Replace with
The value added in the 'Replace with' field are different processed in Camel 4 as in Camel 2. It concerns the values: \n, \r and \t. The expectation is that the value in the 'Replace with' field will replace the value in the 'Regex' field litterally. Looks like the 'Replace with' is interpreted as regex as well.
Test case Instance: acceptance and development Tenant: regression Tests Flow: ReplaceWith Tests in Postman: ReplaceWith CR /linefeed / tab or in cURL (use 'development' in stead of 'acceptance' for the development instance)
curl --location 'https://acceptance.dovetail.world/test/inbound_http/regressiontests/ReplaceWith?config=cr'
--header 'Content-Type: text/plain'
--data 'a,bCRc,dCRe,fCR'
curl --location 'https://acceptance.dovetail.world/test/inbound_http/regressiontests/ReplaceWith?config=linefeed'
--header 'Content-Type: text/plain'
--data 'a,bLNc,dLNe,fLN'
curl --location 'https://acceptance.dovetail.world/test/inbound_http/regressiontests/ReplaceWith?config=tab'
--header 'Content-Type: text/plain'
--data 'aTABb
cTABd
eTABf'
If possible, could you provide text files with:
- Input
- Expected output
- Actual output
Attached examples for cr
Seems like we need to unescape the exceptional characters. This is a function from Camel. I added this so that it behaves like old way, but maybe in the future we can use a different approach.