Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(^-----BEGIN CERTIFICATE-----.*?-----END CERTIFICATE-----)$
/
msg

Description

Match all certificate in a chain from a OpenSSL s_client output. Need for this come from a script that should be able to verify the root CA of a URL.

Submitted by Evgeni Simeonov - 9 years ago