<?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 Re: Regex Help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483526#M135364</link>
    <description>&lt;P&gt;There was a typo and extra escape characters were needed.  Try the updated answer.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 18:21:02 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-04-27T18:21:02Z</dc:date>
    <item>
      <title>Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483523#M135361</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I am new to regex and struggling to get the Actual value field. I only need the number in between the quotes as sometimes the number can be smaller or larger than the example in the event. Below is an example of what I was trying with no luck. Any help is appreciated. &lt;BR /&gt;
| rex "\svalue\":(?\d+)"&lt;/P&gt;

&lt;P&gt;Message={&lt;BR /&gt;
  "ApplicationId": "babe7022-5a00-4338-a519-0a5bbf5c64ee",&lt;BR /&gt;
  "ApplicationName": "Lacerte 2019",&lt;BR /&gt;
  "Measurement": "lacerteload_2019",&lt;BR /&gt;
  "Description": "Measurement duration (59.615s) exceeded threshold of 40s (49.04%)",&lt;BR /&gt;
  "Actual value": "59.615",&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 17:15:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483523#M135361</guid>
      <dc:creator>tkerr1357</dc:creator>
      <dc:date>2020-04-27T17:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483524#M135362</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;| rex "value\\": \\"(?&amp;lt;actualValue&amp;gt;[^\\"]+)"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 17:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483524#M135362</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-27T17:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483525#M135363</link>
      <description>&lt;P&gt;no such luck. It returned Error in 'SearchParser': Missing a search command before '^'. Error at position '107' of search query 'search index="login_pi" source="WinEventLog:LoginP...{snipped} {errorcontext = (?[^\"]+)"}'.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 17:44:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483525#M135363</guid>
      <dc:creator>tkerr1357</dc:creator>
      <dc:date>2020-04-27T17:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483526#M135364</link>
      <description>&lt;P&gt;There was a typo and extra escape characters were needed.  Try the updated answer.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 18:21:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483526#M135364</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-27T18:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483527#M135365</link>
      <description>&lt;P&gt;There is a often overlooked utility that is extremely useful for these type situations..."erex".&lt;/P&gt;

&lt;P&gt;Run your existing search and pipe the results to erex, give the field a name, and provide an example value.&lt;/P&gt;

&lt;P&gt;e.g.&lt;BR /&gt;
| erex ApplicationId examples="babe7022-5a00-4338-a519-0a5bbf5c64ee"&lt;/P&gt;

&lt;P&gt;When the search returns, go to the job inspector and it will provide the regex that Splunk used to find the value.&lt;BR /&gt;
You can also use "counterexamples" to eliminate matches.&lt;/P&gt;

&lt;P&gt;It's a very handy tool.&lt;/P&gt;

&lt;P&gt;Documentation:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.3/SearchReference/Erex"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.3/SearchReference/Erex&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 19:58:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-Help/m-p/483527#M135365</guid>
      <dc:creator>codebuilder</dc:creator>
      <dc:date>2020-04-27T19:58:55Z</dc:date>
    </item>
  </channel>
</rss>

