<?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 to extract a part of a field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346300#M164299</link>
    <description>&lt;P&gt;If you really want to change the field with a Splunk search, then try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval mail=substr(mail,0,len(mail)-1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I think the better approach is to improve the actual field extraction. Can you provide the field extraction under Settings/Fields/Field extractions?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2017 09:22:29 GMT</pubDate>
    <dc:creator>Yunagi</dc:creator>
    <dc:date>2017-12-15T09:22:29Z</dc:date>
    <item>
      <title>How to extract a part of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346298#M164297</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;i have got a field extraction called mail. So i get different kind of mails as output. &lt;/P&gt;

&lt;P&gt;But it appears the following problem: All the mail adresses have a "." at the end and i want to remove the ".".&lt;/P&gt;

&lt;P&gt;For example: "&lt;A href="mailto:xy.z@yahoo.com"&gt;xy.z@yahoo.com&lt;/A&gt;." shall be "&lt;A href="mailto:xy.z@yahoo.com"&gt;xy.z@yahoo.com&lt;/A&gt;"&lt;/P&gt;

&lt;P&gt;I tried to solve the problem  by extracting the expression without the "." but it won't work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=mail "(?&amp;lt;mail&amp;gt;[\s]+)-."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 08:55:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346298#M164297</guid>
      <dc:creator>reschal</dc:creator>
      <dc:date>2017-12-15T08:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a part of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346299#M164298</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=mail "(?P&amp;lt;mail&amp;gt;[^\s]+)\."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if it helps!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 09:17:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346299#M164298</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2017-12-15T09:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a part of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346300#M164299</link>
      <description>&lt;P&gt;If you really want to change the field with a Splunk search, then try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval mail=substr(mail,0,len(mail)-1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I think the better approach is to improve the actual field extraction. Can you provide the field extraction under Settings/Fields/Field extractions?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 09:22:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346300#M164299</guid>
      <dc:creator>Yunagi</dc:creator>
      <dc:date>2017-12-15T09:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a part of a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346301#M164300</link>
      <description>&lt;P&gt;It works. Thanks very much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 09:52:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-part-of-a-field/m-p/346301#M164300</guid>
      <dc:creator>reschal</dc:creator>
      <dc:date>2017-12-15T09:52:58Z</dc:date>
    </item>
  </channel>
</rss>

