Writing a TCL script to combine everything between two keywords
Example:
X509v3 Extended Key Usage: 1.2.3.4, 1.3.6.1.4.1.311.4, 1.1.1.1, 234.432.1.36.4564.345 55.55.55.55, 66.66.66.66, 1234.5443.123.321.12.332.231.1 X509v3 Subject Key Identifier:
I want to be able to get all the information between advanced key usage and the key identifier.
1.2.3.4, 1.3.6.1.4.1.311.4, 1.1.1.1, 234.432.1.36.4564.345 55.55.55.55, 66.66.66.66, 1234.5443.123.321.12.332.231.1
What I tried without success:
set content [regexp {(?=<Extended Key Usage)(?s)(.*)(?=X509)} $ext match] . set content [regexp {\y(Extended Key Usage)(.*)(X509)\y} $ext match]
source share