The regular expression to remove the starting and ending parts from a certificate PEM string would be:
/-----BEGIN CERTIFICATE-----(.*)-----END CERTIFICATE-----/s
This regular expression matches the starting string -----BEGIN CERTIFICATE-----
, followed by any characters (captured using the parentheses and the .*
expression), and then the ending string -----END CERTIFICATE-----
. The s
flag at the end of the regex allows the dot character to match newlines as well.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-06-29 11:00:00 +0000
Seen: 9 times
Last updated: Jul 30 '21
What is an application that tracks the progress of SSL/TLS certificate issuance?
How can I generate PEM certificates using .NET Framework 4.8?
What is the process for utilizing HTTPS during development?
How do Node's standard https and node-fetch differ in their approach to providing a certificate?
What is the regular expression to eliminate the characters \n and \t?
How can the issue of text size error be resolved in an After Effect expression?