I'm trying to convert below message to represent in the text Area which i got from the The JAVA Rest API call (Thirdpaty)and the message is this
String x = "-----BEGIN PGP MESSAGE-----\nVersion: BCPG v1.58\n\nhIwDmCS94uDDx9kBA/4jkqEOWjbe03C1Dgd2A9eDBdk6cYczsOu6Typm0kjT15uQ\nT+Qc4Koz/yIq4gQpwccxRQ9NGl3Bi1cmPYvwxHIe+4bmqd31Izdkaj1VJCEVqZl2\nrLZvogFOo1oHUmdL2uIdUQJGJgslEOh91wp7CfxGhlxKSg0PvY3gyyWyofUwx9JU\nAUu+NY6YYrfd2l95C7EmMJXUDPysCitl/TGy04DbMuMNAyjZPPfkXqvjcG4A10nk\nPujs6RjnRYyCk+3ZJxvkhsjvGXKIQi7gTgWz7AV8vkBhSM2M\n\u003dRtkb\n-----END PGP MESSAGE-----\n"
When the message displays in the HTML text Area after applying regex patterns
x.replaceAll("(\r\n|\n)", "<br />");
x.replaceAll("(\r\n|\n)", "<br />");
<textarea rows="10" cols="50" id="test" name="test"><%=pKey%> </textarea>
still appearing like this
")`. Or `x=x.replaceAll("\\R+", "
")`. – Wiktor Stribiżew Dec 04 '17 at 08:04
");` otherwise the `EOL` character `\n` will be taken into account – Allan Dec 04 '17 at 08:14