I'm new using regex expresions, I'm trying to get a metric and I need to find a regex to exclude some metrics.
I have a lot of metrics, and always 2 kinds of metrics.
The first one is like this (I need to do a metric grouping with all metrics similar to this one):
WebServices\|Server\|server1/ws\.verDato\.ws\.provider\.verDatoX:Responses Per Interval
The second one is like this:
WebServices\|Server\|server1/ws\.VerDato\.ws\.provider\.verDatoX\|consulta:Responses Per Interval
You can see that the onliest difference is in the second one "\|consulta" that is the method in the webservice, I need to create a metric grouping with metrics similar to the first one, and no-one of the second type must be in the group. Which regex expresion should I use?
Thanks a lot for your help, best regards
So yo want to group these metrics
But leave this one out?
So basically you would want to use a negative lookahead as per below.
Thanks for your answer, but in my case there are more methods diferent to consulta, I need a Regex expresion where I only look for responses per interval just without the pipe, I mean, all metrics with "\|method" have to be out the metric grouping. Perhaps could I try with your answer but adding ?!\|(string without blancks) ? I Will try next monday.
Thanks for your help.
You coulduse below Expression to get Responses Per Interval till before method level. [No '\|consulta' or any othe rmethod will be coming up via this]
WebServices\|Server\|([^\|:]*):Responses Per Interval
This will give you details one level up for all webservices details.
Hope it helps.
that is what I need, it runs perfectly.
Hi Vicente: Was Vaibhav's answer helpful or is further assistance needed?
Yes, Vaibhav's answer was very helpful for me.
Enviado el: domingo, 17 de abril de 2016 15:43
Para: CALZADA OLIVA, VICENTE
Asunto: Re: - Problem with regex expresion
CA Communities <https://communities.ca.com/?et=watches.email.thread>
Problem with regex expresion
reply from HALLETT GERMAN<https://communities.ca.com/people/gerha02?et=watches.email.thread> in CA APM - View the full discussion<https://communities.ca.com/message/241876570?et=watches.email.thread#comment-241876570>
Good to know that it worked