Regular Expressions 101

Community Patterns

artifactory-acess

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^<[0-9]+>(?:[A-Z][a-z]{2}\s+[0-9]{1,2}\s[0-9]{1,2}:[0-9]{2}:[0-9]{2})\s*(?:[^\s]+)?\s*artifactory-access\s*(?P<Timestamp>[0-9]{4}-[0-9]{2}-[0-9]{2}\s*[0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3})?\s*(?:\[(?P<ActionResponse>[A-Z]+)\s(?P<ActionType>[A-Z]+)\])?\s*(?:(?P<RepositoryPath>[^\s]+))?\s*(?P<Message>[^:]*)?\s*:\s*(?P<Username>\w+)\s\/\s(?P<IP>[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})?.*$
/
gm

Description

no description available

Submitted by anonymous - 3 years ago