The Jenkins email-ext plugin supports a ${LOG_REGEX} 'token'. It's documented like this:
${LOG_REGEX}
Uses a regular expression to find a single log entry and generates a new output using the capture groups from it. This is partially based on the description-setter plugin (https://github.com/jenkinsci/description-setter-plugin).
(That's part of the documentation that's shown when I click on the "?" (question mark) associated with the Content Token Reference in the Editable Email Notification section of the Jenkins project configuration page.)
When I use this token, how do I specify the regular expression and the output? I guess it probably takes a pair of parameters, but, if so, what are their names?
I determined through trial and error that the parameter names are
regexandreplacement.For example, if your job console contains
then the token
will be replaced by
Keep in mind that, in parameter values,
\and"must be escaped with a\.