Regular Expressions 101

Community Patterns

1...34567...902

Community Library Entry

1

Regular Expression
Python

r"
TASK\s\[(?P<task_name>[A-Za-z0-9_ -]+)\]\s\*+\n(?P<host_result_block>.*?((?=^TASK\s)|(?=^PLAY\sRECAP)))
"
gms

Description

Parse Task Titles and capture results/output of each task

Submitted by Paul Cummings - a year ago