Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^module.(?<module_name>.*)\.(?<module_subname>.*)\.(?<module_item>[a-z|\_|\-|\[|\]|0-9]*[a-z|\.|\[|0-9\]])\:\ (?<action_type>[A-Z|a-z|\ ]*(?<action_status>\.\.\.\ |complete))|\ after\ (?<complete_time>[0-9]*s)|\((?<elapsed_time>[0-9]*s)\ elapsed\)
/
gm

Description

This regex looks at our terraform build- pipeline jobs and extracts out the fields we need to perform analysis in splunk

Submitted by anonymous - 5 years ago