Regular Expressions 101

Community Patterns

1...34567...902

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