Only Regex part is failing to retrieve in e-mail

91 Views Asked by At

I want to retrieve this from Jenkins build log by using regex.

OutPut:

======================================================
elapsed:  18.09 | threads:    5 | thread time: 65.80 
features:     2 | ignored:    1 | efficiency: 0.73
scenarios:   18 | passed:    18 | failed: 0
======================================================

HTML

<div class="container-info">
    <span  style ="COLOR: #8B0000; ">${BUILD_LOG_REGEX,regex="^.*?======================================================.*?$",linesAfter=3, maxMatches=1, showTruncatedLines=false}
    </span>
</div>
1

There are 1 best solutions below

2
Naga Lokesh Kannumoori On

Output:

======================================================
elapsed:  18.09 | threads:    5 | thread time: 65.80 
features:     2 | ignored:    1 | efficiency: 0.73
scenarios:   18 | passed:    18 | failed: 0
======================================================

You can use this RegExp to get the above output:

^={0,54}(\n.*){1,3}\n={0,54}

Note: If stats are in the middle of the sentence exclude the ^ in the regular expression.