Have you tried replacing
The other thing to try is just to remove the
\ns and insert real newlines over mulitple lines. So long as the string is quoted it should be fine. The other thing to try is to remove the trailing newline since private key regex’s not always consistent on this one.
CLICK HERE to find out more related problems solutions.