AnsweredAssumed Answered

How to remove newline characters

Question asked by SIDDHARTHJAISWAL on May 5, 2017
Latest reply on May 8, 2017 by Mohindra.Singh

Hi,

 

 I am trying to remove #newline characters from given string using #EvaluateRegularExpression assertion; however the output is coming blank again nag again. Below is the string in question:

 

kPorpdbCJx6IeC3f2IOT6y8OTpeUN5Exbv8we7NilNGcSuTP3wD8gmjkAeax0bg0h5ciRMmluI8P
rr0lqybNGw2ZvQzgflPCV0vixFeJD8qTcQv2Y/ps8unMj9eFoyuugiBatZ/VQmWT0EUfI3fhv5hN
z9EHuhrucpgi1q2F/RFKBn8tQtTAcg7jW561x90BFGpfirK3Tzn21hDnqQ4rKp/8IY3dkYx5Rduc
S6x5dxnZPjJcaE4Xai7CTrwgCjPy4esFJM6cWLfCDbCK6EpXgf0aYcBoM38rAADu9dE/L4WULaBW
rJsoz2a9DC7xC6uDM9WAaNL1MskSJedExU0O1Q==

 

And below is the policy:

 

<?xml version="1.0" encoding="UTF-8"?>
<wsp:Policy xmlns:L7p="http://www.layer7tech.com/ws/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
<wsp:All wsp:Usage="Required">
<L7p:Regex>
<L7p:AssertionComment assertionComment="included">
<L7p:Properties mapValue="included">
<L7p:entry>
<L7p:key stringValue="RIGHT.COMMENT"/>
<L7p:value stringValue="This assertion will remove all line breaks and put everything in single line."/>
</L7p:entry>
</L7p:Properties>
</L7p:AssertionComment>
<L7p:AutoTarget booleanValue="false"/>
<L7p:CaptureVar stringValue="output"/>
<L7p:CaseInsensitive booleanValue="true"/>
<L7p:IncludeEntireExpressionCapture booleanValue="false"/>
<L7p:Regex stringValue="\n"/>
<L7p:RegexName stringValue="Replace NewLine"/>
<L7p:Replace booleanValue="true"/>
<L7p:Replacement stringValue=""/>
</L7p:Regex>
<L7p:HardcodedResponse>
<L7p:Base64ResponseBody stringValue="JHtyZXF1ZXN0Lm1haW5wYXJ0fQo9PT09PT09PT09PT09PT09PT09PT0KJHtvdXRwdXR9"/>
<L7p:EarlyResponse booleanValue="true"/>
<L7p:ResponseContentType stringValue="text/html; charset=UTF-8"/>
</L7p:HardcodedResponse>
</wsp:All>
</wsp:Policy>

 

 

Please help.

 

Thanks,

Siddharth

Outcomes