<?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: Function to fetch a part of a field value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129015#M35082</link>
    <description>&lt;P&gt;small correction here in rex. Field name extracted with @ is username. &lt;/P&gt;

&lt;P&gt;your base search..| rex field=username "(?&lt;USERNAME&gt;.*)@"&lt;/USERNAME&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jan 2014 23:15:45 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-01-29T23:15:45Z</dc:date>
    <item>
      <title>Function to fetch a part of a field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129010#M35077</link>
      <description>&lt;P&gt;A field called username has values &lt;BR /&gt;
INPUT:&lt;BR /&gt;
 &lt;A href="mailto:kesia@abc.bgf.hf"&gt;kesia@abc.bgf.hf&lt;/A&gt;:123&lt;BR /&gt;
 &lt;A href="mailto:gefuf@ef.eff.gre"&gt;gefuf@ef.eff.gre&lt;/A&gt;:872&lt;BR /&gt;
.I want to take the string before the @ symbol alone like&lt;BR /&gt;
OUTPUT:&lt;BR /&gt;
 kesis&lt;BR /&gt;
 gefuf&lt;/P&gt;

&lt;P&gt;How can this be done in splunk and Which function will be apt to this requirement?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 07:40:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129010#M35077</guid>
      <dc:creator>Jananee_iNautix</dc:creator>
      <dc:date>2014-01-29T07:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Function to fetch a part of a field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129011#M35078</link>
      <description>&lt;P&gt;Is the username field a multivalue field or did you just provide two examples for possible values?&lt;BR /&gt;
And are you referring to an extraction at search time or at indexing time (field extraction)?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 07:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129011#M35078</guid>
      <dc:creator>hRun</dc:creator>
      <dc:date>2014-01-29T07:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Function to fetch a part of a field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129012#M35079</link>
      <description>&lt;P&gt;Hi Jananee_iNautix,&lt;/P&gt;

&lt;P&gt;based on the provided information, you can use &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.1/SearchReference/Rex"&gt;rex&lt;/A&gt; to do this in search time like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YorFancySearch | rex field=username "\s(?&amp;lt;username&amp;gt;.*)\@" | ....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want that field to be extracted at index time, use the this &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.1/Data/Aboutindexedfieldextraction"&gt;guide&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 07:49:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129012#M35079</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-01-29T07:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Function to fetch a part of a field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129013#M35080</link>
      <description>&lt;P&gt;At search time only.i extracted the field username which has sample values i specified.i want to extract a part of that field value&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 08:31:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129013#M35080</guid>
      <dc:creator>Jananee_iNautix</dc:creator>
      <dc:date>2014-01-29T08:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Function to fetch a part of a field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129014#M35081</link>
      <description>&lt;P&gt;i don want to extract it like you said.Using functions i want to take kesia alone from the value &lt;A href="mailto:kesia@abc.bgf.hf"&gt;kesia@abc.bgf.hf&lt;/A&gt;:123 named as a field username&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 08:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129014#M35081</guid>
      <dc:creator>Jananee_iNautix</dc:creator>
      <dc:date>2014-01-29T08:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Function to fetch a part of a field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129015#M35082</link>
      <description>&lt;P&gt;small correction here in rex. Field name extracted with @ is username. &lt;/P&gt;

&lt;P&gt;your base search..| rex field=username "(?&lt;USERNAME&gt;.*)@"&lt;/USERNAME&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2014 23:15:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Function-to-fetch-a-part-of-a-field-value/m-p/129015#M35082</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-29T23:15:45Z</dc:date>
    </item>
  </channel>
</rss>

