<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Regex Help for special characters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251316#M75109</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My log looks like this. I am trying to get the average response time by service.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ServiceInvoker (service_A) : executeFlow : Time Take is = 3378
ServiceInvoker (service_B) : executeFlow : Time Take is = 378
ServiceInvoker (service_C) : executeFlow : Time Take is = 338
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is what i have: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=app  |rex '\ServiceInvoker\s+"((?&amp;lt;service&amp;gt;\S+))"\s+:\s+executeFlow\s+:\s+Time\s+take\s+is\s+=\s+(?&amp;lt;response_time&amp;gt;\d+)'   | stats  sparkline(avg(response_time),1m) as processTime_trend, avg(response_time),count BY service 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The brackets that are surrounding the service name is causing an issue for retrieving the results. Any help or ideas would be appreciated.&lt;BR /&gt;
Thanks in advance &lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2016 23:10:14 GMT</pubDate>
    <dc:creator>chanukhya</dc:creator>
    <dc:date>2016-11-29T23:10:14Z</dc:date>
    <item>
      <title>Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251316#M75109</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My log looks like this. I am trying to get the average response time by service.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ServiceInvoker (service_A) : executeFlow : Time Take is = 3378
ServiceInvoker (service_B) : executeFlow : Time Take is = 378
ServiceInvoker (service_C) : executeFlow : Time Take is = 338
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is what i have: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=app  |rex '\ServiceInvoker\s+"((?&amp;lt;service&amp;gt;\S+))"\s+:\s+executeFlow\s+:\s+Time\s+take\s+is\s+=\s+(?&amp;lt;response_time&amp;gt;\d+)'   | stats  sparkline(avg(response_time),1m) as processTime_trend, avg(response_time),count BY service 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The brackets that are surrounding the service name is causing an issue for retrieving the results. Any help or ideas would be appreciated.&lt;BR /&gt;
Thanks in advance &lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:10:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251316#M75109</guid>
      <dc:creator>chanukhya</dc:creator>
      <dc:date>2016-11-29T23:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251317#M75110</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;UPDATED&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app  |rex "[^\(]+\((?&amp;lt;servicename&amp;gt;[^\)]+)\)[^=]+=[\s\t]+(?&amp;lt;response_time&amp;gt;\d+)"  | stats  sparkline(avg(response_time),1m) as processTime_trend, avg(response_time),count BY service
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;OR&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app  |rex "[^\(]+\((?&amp;lt;servicename&amp;gt;[^\)]+)" | rex "=[\s\t]+(?&amp;lt;response_time&amp;gt;\d+)"  | stats  sparkline(avg(response_time),1m) as processTime_trend, avg(response_time),count BY service
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251317#M75110</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-29T23:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251318#M75111</link>
      <description>&lt;P&gt;Hi @Chanukhya,&lt;/P&gt;

&lt;P&gt;Just escape the &lt;CODE&gt;(&lt;/CODE&gt; with a backslash.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/BTBkvw/1"&gt;https://regex101.com/r/BTBkvw/1&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ServiceInvoker\s+\((?&amp;lt;service_name&amp;gt;\w+)\)\s+:\s+(?&amp;lt;service_flow&amp;gt;\w+)\s+:[^=]+=\s(?&amp;lt;response_time&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:17:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251318#M75111</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2016-11-29T23:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251319#M75112</link>
      <description>&lt;P&gt;Sorry, It didn't work. Updated my question.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:34:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251319#M75112</guid>
      <dc:creator>chanukhya</dc:creator>
      <dc:date>2016-11-29T23:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251320#M75113</link>
      <description>&lt;P&gt;Sorry, It didn't worked. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251320#M75113</guid>
      <dc:creator>chanukhya</dc:creator>
      <dc:date>2016-11-29T23:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251321#M75114</link>
      <description>&lt;P&gt;Try the updated query&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251321#M75114</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-29T23:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251322#M75115</link>
      <description>&lt;P&gt;It didn't worked as well, The service names are different and some service names has an underscore in the name and some dont. I am trying to get the average response times and count for each service, which is in between the brackets.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:46:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251322#M75115</guid>
      <dc:creator>chanukhya</dc:creator>
      <dc:date>2016-11-29T23:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251323#M75116</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app 
|rex field=_raw "(.*|^)ServiceInvoker\s*\((?&amp;lt;service_name&amp;gt;[^\)]+)\)\s*.*Time\s*Take\s*is\s*\=\s*(?&amp;lt;respTime&amp;gt;[\d]+)"
| stats  sparkline(avg(respTime),1m) as processTime_trend, avg(respTime),count BY service_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/BErB8z/3"&gt;See here the regex in action&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 23:57:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251323#M75116</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-29T23:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251324#M75117</link>
      <description>&lt;P&gt;Do you see any results when you try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app  | rex "[^\(]+\((?&amp;lt;servicename&amp;gt;[^\)]+)\)[^=]+=[\s\t]+(?&amp;lt;response_time&amp;gt;\d+)"  | table servicename response_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2016 00:07:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251324#M75117</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-11-30T00:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251325#M75118</link>
      <description>&lt;P&gt;Remember to put backslash before =&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 06:45:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251325#M75118</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-11-30T06:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251326#M75119</link>
      <description>&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:03:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251326#M75119</guid>
      <dc:creator>chanukhya</dc:creator>
      <dc:date>2016-11-30T16:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help for special characters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251327#M75120</link>
      <description>&lt;P&gt;Do you need all the line in the regex?  If not, you can do like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app  | rex "Time Take is =\s(?&amp;lt;respnse_time&amp;gt;\d+)"  | stats  sparkline(avg(response_time),1m) as processTime_trend, avg(response_time),count BY service 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:14:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help-for-special-characters/m-p/251327#M75120</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-11-30T16:14:42Z</dc:date>
    </item>
  </channel>
</rss>

