<?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: Help Needed with Regular Expression in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251597#M75200</link>
    <description>&lt;P&gt;Apologies. I missed a bracket there &lt;CODE&gt;| rex "Parameter name=\"NOTIFY_CORRELATION_ID\" value=\"(?[^"]*)"&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2016 02:52:16 GMT</pubDate>
    <dc:creator>Murali2888</dc:creator>
    <dc:date>2016-01-29T02:52:16Z</dc:date>
    <item>
      <title>Help Needed with Regular Expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251594#M75197</link>
      <description>&lt;P&gt;Hi All, &lt;/P&gt;

&lt;P&gt;i am newbie to splunk platform and seeking some help in writing a regular expression to pull a "" value from the XML type log. Sample XML is as mentioned below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&amp;gt;
&amp;lt;S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"&amp;gt;
    &amp;lt;S:Body&amp;gt;
        &amp;lt;Response xmlns="http://soa.comptel.com/2011/02/instantlink"&amp;gt;
            &amp;lt;ResponseHeader&amp;gt;
                &amp;lt;RequestId&amp;gt;83506576&amp;lt;/RequestId&amp;gt;
                &amp;lt;Status&amp;gt;9&amp;lt;/Status&amp;gt;
                &amp;lt;OrderNo /&amp;gt;
                &amp;lt;StatusMessage&amp;gt;Request Ready&amp;lt;/StatusMessage&amp;gt;
                &amp;lt;StatusMessageId&amp;gt;RC-0000&amp;lt;/StatusMessageId&amp;gt;
                &amp;lt;Priority&amp;gt;5&amp;lt;/Priority&amp;gt;
                &amp;lt;ReqUser&amp;gt;bss&amp;lt;/ReqUser&amp;gt;
                &amp;lt;ReceivedDate&amp;gt;2016-01-29T11:27:15.951+11:00&amp;lt;/ReceivedDate&amp;gt;
                &amp;lt;FinishedDate&amp;gt;2016-01-29T11:27:17.033+11:00&amp;lt;/FinishedDate&amp;gt;
            &amp;lt;/ResponseHeader&amp;gt;
            &amp;lt;ResponseParameters&amp;gt;
                &amp;lt;Parameter name="PREFIX" value="REMOVE_B4_TO_OSSBSS_" /&amp;gt;
                &amp;lt;Parameter name="NOTIFY_INTERACTION_STATUS" value="Success" /&amp;gt;
            &amp;lt;/ResponseParameters&amp;gt;
            &amp;lt;RequestParameters&amp;gt;
                &amp;lt;Parameter name="NOTIFICATION_MSG_LEVEL" value="0" /&amp;gt;
                &amp;lt;Parameter name="RESP_QUEUE_ID" value="SYNCSOA" /&amp;gt;
                &amp;lt;Parameter name="NOTIFY_NBN_ORDER_ID" value="ORD000048321077" /&amp;gt;
                &amp;lt;Parameter name="REQ_OBJ" value="1" /&amp;gt;
                &amp;lt;Parameter name="SERVICE_TYPE" value="createBillingEventResponse" /&amp;gt;
                &amp;lt;Parameter name="NOTIFY_CORRELATION_ID" value="4b24bd92-aee3-474a-8c99-9067fbb06ef1" /&amp;gt;
                &amp;lt;Parameter name="NOTIFY_BILLING_SUCCESSFUL" value="YES" /&amp;gt;
                &amp;lt;Parameter name="CLIENT_ID" value="bss" /&amp;gt;
                &amp;lt;Parameter name="ORIGIN" value="1" /&amp;gt;
                &amp;lt;Parameter name="REQ_TYPE" value="1" /&amp;gt;
                &amp;lt;Parameter name="NOTIFY_ACCESS_SEEKER_ID" value="ASI000000000035" /&amp;gt;
            &amp;lt;/RequestParameters&amp;gt;
        &amp;lt;/Response&amp;gt;
    &amp;lt;/S:Body&amp;gt;
&amp;lt;/S:Envelope&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From above log i wish to access  &lt;STRONG&gt;NOTIFY_CORRELATION_ID&lt;/STRONG&gt; for which value = &lt;STRONG&gt;4b24bd92-aee3-474a-8c99-9067fbb06ef1&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Can anyone please suggest me a search sub string ? &lt;/P&gt;

&lt;P&gt;Example :  | xpath field=message outfield=CORRELATION_ID "//RequestParameters/[ID='NOTIFY_CORRELATION_ID']/../value" &lt;/P&gt;

&lt;P&gt;Best Regards&lt;BR /&gt;
Rishi&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:34:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251594#M75197</guid>
      <dc:creator>rishiaggarwal</dc:creator>
      <dc:date>2020-09-29T08:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed with Regular Expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251595#M75198</link>
      <description>&lt;P&gt;if the NOTIFY_CORRELATION_ID is occurring once per message then you can use&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "Parameter name=\"NOTIFY_CORRELATION_ID\" value=\"(?&amp;lt;CorrelationID&amp;gt;[^"]"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if there is multiple occurrence per message you can add &lt;CODE&gt;max_match=0&lt;/CODE&gt; with the rex command which will extract a multi-value field per event. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251595#M75198</guid>
      <dc:creator>Murali2888</dc:creator>
      <dc:date>2020-09-29T08:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed with Regular Expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251596#M75199</link>
      <description>&lt;P&gt;Thanks for the response. While running this query i am getting an error "&lt;STRONG&gt;Mismatched ']'.&lt;/STRONG&gt;"&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 02:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251596#M75199</guid>
      <dc:creator>rishiaggarwal</dc:creator>
      <dc:date>2016-01-29T02:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed with Regular Expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251597#M75200</link>
      <description>&lt;P&gt;Apologies. I missed a bracket there &lt;CODE&gt;| rex "Parameter name=\"NOTIFY_CORRELATION_ID\" value=\"(?[^"]*)"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 02:52:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251597#M75200</guid>
      <dc:creator>Murali2888</dc:creator>
      <dc:date>2016-01-29T02:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed with Regular Expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251598#M75201</link>
      <description>&lt;P&gt;Try backslashing escaping the second to last quote (") and closing parenthesis ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "Parameter name=\"NOTIFY_CORRELATION_ID\" value=\"(?&amp;lt;CorrelationID&amp;gt;[^\"])"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jan 2016 02:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251598#M75201</guid>
      <dc:creator>gcato</dc:creator>
      <dc:date>2016-01-29T02:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed with Regular Expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251599#M75202</link>
      <description>&lt;P&gt;Oh... and a + after the ]&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex "Parameter name=\"NOTIFY_CORRELATION_ID\" value=\"(?&amp;lt;CorrelationID&amp;gt;[^\"]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jan 2016 02:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251599#M75202</guid>
      <dc:creator>gcato</dc:creator>
      <dc:date>2016-01-29T02:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help Needed with Regular Expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251600#M75203</link>
      <description>&lt;P&gt;Hi rishiaggarwal&lt;/P&gt;

&lt;P&gt;Try this one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "Parameter name=\"NOTIFY_CORRELATION_ID\" value=\"(?&amp;lt;NOTIFY_CORRELATION_ID&amp;gt;[^\"]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If correct, please mark as answered so we can close this post. &lt;/P&gt;

&lt;P&gt;j&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 14:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-Needed-with-Regular-Expression/m-p/251600#M75203</guid>
      <dc:creator>jbjerke_splunk</dc:creator>
      <dc:date>2016-01-29T14:02:55Z</dc:date>
    </item>
  </channel>
</rss>

