Yes you are right.... I just verified my LOGs...The line is getting Printed
as part of my API. But some how it's not able to remove [java] from the
REGEX.

i tested my REGEX you can take a look here. It's just trying to grab the
specific line which i want to get it printed in the email... But still i am
not sure from where [java] is coming...
http://regex101.com/r/aZ0dI0

I even tried following thing, Which didn't work and it's just printing
[java] [java] 2 times...
${BUILD_LOG_REGEX,regex="(?=.*?Environment)(?=.*?Total)(E.*?
\\))",showTruncatedLines=false,substText="$1"}


On Wed, Jan 15, 2014 at 2:10 PM, Slide <[email protected]> wrote:

> [java] is not printed by the build log regex token, I can guarantee that.
> On Jan 15, 2014 2:43 PM, "devanand" <[email protected]> wrote:
>
>> I think i got it what are you trying to say now.... I tried your approach
>> but it's still printing same thing...
>>
>> But seems like this is not the solution... As i can still see [java] is
>> always getting printed as part of any BUILD_LOG_REGEX whatever i do... As
>> that is coming from this API itself... Seems like i can't avoid this to get
>> it printed as part of email.. No solution seems like..
>>
>>
>>
>> On Wednesday, January 15, 2014 12:53:23 PM UTC-8, slide wrote:
>>>
>>> I don't have a way to test, so I can't tell you exactly what you need to
>>> use. The substText can use $0 through $9 to be the matching groups for the
>>> replacement text, so something like this (THIS WILL NOT WORK AS IS).
>>>
>>> ${BUILD_LOG_REGEX,regex="(?=.*?Environment)(?=.*?Total)(E.*?
>>> \\))",showTruncatedLines=false,substText="$1"}
>>>
>>>
>>> On Wed, Jan 15, 2014 at 11:34 AM, devanand <[email protected]> wrote:
>>>
>>>> I am still confused sorry but i never used substText before and i
>>>> didn't find any good documentation for this too so i am asking the question
>>>> again...
>>>>
>>>> ${BUILD_LOG_REGEX,regex="(?=.*?Environment)(?=.*?Total)(E.*?
>>>> \\))",showTruncatedLines=false,substText=Matcher.appendReplacement
>>>> [StringBuffer,String]}
>>>>
>>>> Now what should i pass here as part of StringBuffer object and String
>>>> Object ??
>>>>
>>>> Currently i am getting this output from EMAIL if i use following line.
>>>> ${BUILD_LOG_REGEX,regex="(?=.*?Environment)(?=.*?Total)(E.*?
>>>> \\))",showTruncatedLines=false}
>>>>
>>>> *[java] Environment: ABC Total(Pass:0 Fail:1 Incomplete:0 Delayed:0
>>>> Manual Verification:0) *
>>>>
>>>> What exactly i need to modify here in order to get the output from LOG
>>>> file like this ?
>>>>
>>>>
>>>> *Environment: ABC Total(Pass:0 Fail:1 Incomplete:0 Delayed:0 Manual
>>>> Verification:0) *
>>>>
>>>> This will be helpful if you can give me a exact sample here.. As i
>>>> never used it before...
>>>>
>>>> Thanks.
>>>>
>>>> On Wednesday, January 15, 2014 9:40:29 AM UTC-8, slide wrote:
>>>>
>>>>> 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/M
>>>>>>> atcher.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.
>>>>
>>>
>>>
>>>
>>> --
>>> 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.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Jenkins Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jenkinsci-users/pA1X4ItAaIk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Thanks & Regards,
Daivish.

760-529-6062 (M)
760-494-8806 (H)

*L* life gives Answers in Three ways,
*I* t says *Y*ES and gives *whatever* u Want,
*I* t says *N*O and gives u *S*omething Better
*I* t says *W*ait and gives u the *B*est
*"D **don’t just Dream. Live you’re Dream."*

-- 
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