The BUILD_LOG_REGEX token has a substText parameter, you specify the
replacement you want to replace the matched regex with. You can use the
same syntax for the replacement string as is supported by appendReplacement
of the Matcher object, e.g., (this does not solve your issue, you'll have
to determine the regex and replacement for you).

${BUILD_LOG_REGEX,regex="Something(.*)",substText="$1"}

slide


On Wed, Jan 15, 2014 at 10:24 AM, devanand <[email protected]> wrote:

> Hi,
>
> I am using Email Ext Plugin here... I don't see a way to use JAVA API as a
> part of the EMAIL feature for Jenkins.
>
>
> https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin#Email-extplugin-Scriptcontent
>
> Can anyone guide me what syntax i need to write in order to remove [JAVA]
> from the actual email  ?
>
> Thanks.
>
>
>
> On Tuesday, January 14, 2014 6:23:23 PM UTC-8, slide wrote:
>
>> You can use the substText which is passed to Matcher.appendReplacement
>> [1], you can see how to use that in the Javadoc. You can use $0 through $9
>> to be the matched groups.
>>
>> slide
>>
>> 1 - http://docs.oracle.com/javase/6/docs/api/java/util/
>> regex/Matcher.html#appendReplacement(java.lang.StringBuffer,
>> java.lang.String)
>>
>>
>> On Tue, Jan 14, 2014 at 6:47 PM, devanand <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> I have this value configured to send out email, Under editable email
>>> configuration section of the JOB.
>>>
>>>
>>> ${BUILD_LOG_REGEX,regex="(?=.*?Environment)(?=.*?Total)(E.*?
>>> \\))",showTruncatedLines=false}
>>>
>>> As i result of this LINE i am getting this value as part of my Email.
>>>
>>> *[java] Environment: ABC Total(Pass:0 Fail:1 Incomplete:0 Delayed:0
>>> Manual Verification:0) *
>>>
>>>
>>> *But i don't want [java] to be printed as part of my email, How can i
>>> avoid this ?? I am looking to resolve this issue. *
>>>
>>> *Thanks.*
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>
>>
>> --
>> Website: http://earl-of-code.com
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Website: http://earl-of-code.com

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to