I'm trying to create a regexp that will capture the first occurrence of a repeating string.
The string is a "list" of RSA certificates , in succession. I am only interested in the first.
The string looks like:
-----BEGIN CERTIFICATE-----
CERT1..........
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
CERT2............
-----END CERTIFICATE-----
...
...
...
I've tried variations on the following , but it is returning the full list rather than the first item:
set match [regexp {(-----BEGIN CERTIFICATE-----.*-----END CERTIFICATE-----$).*} $certs matchAll firstCert]