Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^(?:(?P<prefix>.+)\/)?(?P<date>\d{8})/(?P<start_time>\d{8}T\d{6}Z)_(?P<end_time>\d{8}T\d{6}Z)_(?P<random_string>.+)\.log\.gz$
"
gm

Description

this parses keys for logpush log files from cloudflare in s3

Submitted by anonymous - 5 years ago