<?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 extract data after a colon in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-data-after-a-colon/m-p/128606#M34919</link>
    <description>&lt;P&gt;example&lt;/P&gt;

&lt;P&gt;[dto=forename: "abcforename"&lt;BR /&gt;
surname: "abcsurname" ..................]&lt;/P&gt;

&lt;P&gt;I want to extract the forename and surname , &lt;BR /&gt;
and let them combine as a field USER&lt;/P&gt;

&lt;P&gt;how?&lt;/P&gt;

&lt;P&gt;MANY THX. &lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2015 03:29:12 GMT</pubDate>
    <dc:creator>joyce1018</dc:creator>
    <dc:date>2015-02-06T03:29:12Z</dc:date>
    <item>
      <title>how to extract data after a colon</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-data-after-a-colon/m-p/128606#M34919</link>
      <description>&lt;P&gt;example&lt;/P&gt;

&lt;P&gt;[dto=forename: "abcforename"&lt;BR /&gt;
surname: "abcsurname" ..................]&lt;/P&gt;

&lt;P&gt;I want to extract the forename and surname , &lt;BR /&gt;
and let them combine as a field USER&lt;/P&gt;

&lt;P&gt;how?&lt;/P&gt;

&lt;P&gt;MANY THX. &lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 03:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-data-after-a-colon/m-p/128606#M34919</guid>
      <dc:creator>joyce1018</dc:creator>
      <dc:date>2015-02-06T03:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract data after a colon</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-data-after-a-colon/m-p/128607#M34920</link>
      <description>&lt;P&gt;Use a multiline rex.. This will capture everything in the "..".&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search.... | rex field=_raw "^\[dto=forename\:\s\"(?&amp;lt;fname&amp;gt;.*)\"\nsurname\:\s\"(?&amp;lt;lastname&amp;gt;.*)\"" | table forename lastname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Another option would be to use props, set your sourcetype with linemerge=false, and define your event boundaries.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 03:46:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-data-after-a-colon/m-p/128607#M34920</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2015-02-06T03:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract data after a colon</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-data-after-a-colon/m-p/128608#M34921</link>
      <description>&lt;P&gt;You would have to tune the regex to match your requirement but the query would be somewhat like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.. | rex field=fieldnamehere "dto\=forename\:\s\"(?&amp;lt;fname&amp;gt;\w+)\"\ssurname\:\s\"(?&amp;lt;sname&amp;gt;\w+)\"" | eval merged=fname." ".sname
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 06 Feb 2015 03:47:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-data-after-a-colon/m-p/128608#M34921</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-02-06T03:47:35Z</dc:date>
    </item>
  </channel>
</rss>

