<?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 How to write a Regular Expression to extract these values from my sample data into new fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Regular-Expression-to-extract-these-values-from/m-p/275778#M83187</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have an application that calls other external applications/systems. I wish to plot the calls to external systems per server.&lt;BR /&gt;
My log files look like this,&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1830iAB84CD5771366645/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have managed to extract a separate field, calls to external systems i.e. the value highlighted above. I need to further extract other values from this field. What I need is stated below,&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1831i19DAAA69982BB761/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Can you please tell me the rex command to be used?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;P&gt;NOTE: All values used in this question are dummy placeholders, and are not original configurations.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2016 14:10:16 GMT</pubDate>
    <dc:creator>namritha</dc:creator>
    <dc:date>2016-09-13T14:10:16Z</dc:date>
    <item>
      <title>How to write a Regular Expression to extract these values from my sample data into new fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Regular-Expression-to-extract-these-values-from/m-p/275778#M83187</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have an application that calls other external applications/systems. I wish to plot the calls to external systems per server.&lt;BR /&gt;
My log files look like this,&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1830iAB84CD5771366645/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have managed to extract a separate field, calls to external systems i.e. the value highlighted above. I need to further extract other values from this field. What I need is stated below,&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1831i19DAAA69982BB761/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Can you please tell me the rex command to be used?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;**&lt;/P&gt;

&lt;P&gt;NOTE: All values used in this question are dummy placeholders, and are not original configurations.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 14:10:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Regular-Expression-to-extract-these-values-from/m-p/275778#M83187</guid>
      <dc:creator>namritha</dc:creator>
      <dc:date>2016-09-13T14:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a Regular Expression to extract these values from my sample data into new fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Regular-Expression-to-extract-these-values-from/m-p/275779#M83188</link>
      <description>&lt;P&gt;I don't think you can get all scenarios in one regex. You may be better off (reliability wise) creating separate regex. Something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=fieldextractedfromraw "(?&amp;lt;addtional_info&amp;gt;http.*)\/" | rex field=fieldextractedfromraw "Client invoked\s(?&amp;lt;addtional_info&amp;gt;.*)"  | eval additonal_info=coalesce(additional_info, fieldextractedfromraw)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Sep 2016 14:19:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Regular-Expression-to-extract-these-values-from/m-p/275779#M83188</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-13T14:19:10Z</dc:date>
    </item>
  </channel>
</rss>

