Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^(?P<status>[R|V|E])\t(?P<validDATE>\d*Z)\t(?P<revokation>(?P<revokedDATE>\d*Z)|)\t(?P<serial>[\d|A-Z]*)\t(?P<unknown>.*)\t(?P<subject>/C=(?P<country>.*)/ST=(?P<state>.*)/L=(?P<location>.*)(/OU=(?P<orgunit>.*)|)/CN=(?P<canonicalname>.*)(/name=(?P<name>.*)|)/emailAddress=(?P<email>.*))
"
gm

Description

parse records of index.txt managed by openssl (easyrsa) CA

Submitted by Mikhail Belyankin - 2 years ago