<?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: How can I extract this field using REGEX (rex)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428406#M122578</link>
    <description>&lt;P&gt;Thanks for the response, this is giving me null value&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2018 22:12:55 GMT</pubDate>
    <dc:creator>sarathipattam</dc:creator>
    <dc:date>2018-06-04T22:12:55Z</dc:date>
    <item>
      <title>How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428402#M122574</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have the below raw, I would like to extract &lt;STRONG&gt;MaximumBatchQuantity&lt;/STRONG&gt; value, which is 20. Can someone help me with REGEX, please?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"bdy":{"msg":"HttpRequest","addInfo":[{"key":"Url","value":"https://isp0064x.st.ad.XXXXX.com/XXXXXOmniFulfillmentServerApp/api/Assignment/Auto/"},{"key":"Content","value":"{\"Filters\":[],\"**MaximumBatchQuantity**\":**20**,\"AllowedSLAMilliSeconds\":4500,\"AssociateFirstName\":\"Aliona\",\"AssociateId\":\"2795969\",\"AssociateLastName\":\"Cieniawa\",\"Header\":{\"ApiVersion\":null,\"AppVersion\":\"18.3.0.15617\",\"JsonWebToken\":null,\"MessageId\":\"de959d4f-6a7d-4c0c-98d3-1143064b4300\"},\"IsOffline\":false,\"SLARequestKey\":\"AutoBatch\",\"StoreNumber\":\"0064\"}"},{"key":"CorrelationId","value":""},{"key":"MessageId","value":"3a04038d-64e2-493c-b489-90a922de1980"}]},"hdr":{"level":"Verbose","timestamp":"2018-06-04T21:03:19.6347626Z","fxsrc":"LogRequestInfo","lineNum":710,"userId":"2795969","loc":"Store","locId":"0064","ip":"10.224.255.15","hostName":"K-W10ME-7463352","macaddress":"00-16-XX-16-A6-FA","eventid":0,"appVersion":"18.3.0.15617","appName":"OmniFulfillment","deviceModel":"XX500","osVersion":"10.0.14393.2007","firmwareVersion":"1049.7.18039.0","networkSignalStrength":"4","isConnected":"True"},"ver":"0.1"}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jun 2018 21:10:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428402#M122574</guid>
      <dc:creator>sarathipattam</dc:creator>
      <dc:date>2018-06-04T21:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428403#M122575</link>
      <description>&lt;P&gt;Assuming those asterisk in the field name and value of MaximumBatchQuantity is added by you trying to highlight/bold it, give following regex a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MaximumBatchQuantity[^:]+:(?&amp;lt;MaximumBatchQuantity&amp;gt;[^,]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See it working with your sample data&lt;/P&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/URJNJH/1"&gt;https://regex101.com/r/URJNJH/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 21:28:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428403#M122575</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-04T21:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428404#M122576</link>
      <description>&lt;P&gt;I heard you liked JSON, so I put some JSON in your JSON? Eww.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "\\\"MaximumBatchQuantity\\\"\s*:\s*\"?(?&amp;lt;MaximumBatchQuantity&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jun 2018 21:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428404#M122576</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-06-04T21:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428405#M122577</link>
      <description>&lt;P&gt;Thanks for the response, I'm getting below error,&lt;/P&gt;

&lt;P&gt;Error in 'SearchParser': Missing a search command before '^'. Error at position '522' of search query 'search index=kohls_prod_stores_servers sourcetype=...{snipped} {errorcontext = hQuantity[^:]+:(?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:46:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428405#M122577</guid>
      <dc:creator>sarathipattam</dc:creator>
      <dc:date>2020-09-29T19:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428406#M122578</link>
      <description>&lt;P&gt;Thanks for the response, this is giving me null value&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 22:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428406#M122578</guid>
      <dc:creator>sarathipattam</dc:creator>
      <dc:date>2018-06-04T22:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428407#M122579</link>
      <description>&lt;P&gt;What's the search you're using? I just gave you the regex portion, you'd need to add other search parts.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 22:16:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428407#M122579</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-04T22:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428408#M122580</link>
      <description>&lt;P&gt;I used this way&lt;/P&gt;

&lt;P&gt;| rex field=_raw MaximumBatchQuantity[^:]+:(?[^,]+)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 22:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428408#M122580</guid>
      <dc:creator>sarathipattam</dc:creator>
      <dc:date>2018-06-04T22:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract this field using REGEX (rex)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428409#M122581</link>
      <description>&lt;P&gt;put quotes around the expression&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 22:34:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-this-field-using-REGEX-rex/m-p/428409#M122581</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-06-04T22:34:30Z</dc:date>
    </item>
  </channel>
</rss>

