<?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 discard extra text from a single line in events? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577447#M101998</link>
    <description>&lt;P&gt;Discard at the Search time sir&lt;/P&gt;</description>
    <pubDate>Mon, 06 Dec 2021 10:45:43 GMT</pubDate>
    <dc:creator>Kumar2</dc:creator>
    <dc:date>2021-12-06T10:45:43Z</dc:date>
    <item>
      <title>How to discard extra text from a single line in events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577442#M101994</link>
      <description>&lt;P&gt;Example: Mynameissachintendulkar .Except sachin I need to remove remaining all text .please help me with the query. Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 10:35:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577442#M101994</guid>
      <dc:creator>Kumar2</dc:creator>
      <dc:date>2021-12-06T10:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to discard extra text from a single line in events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577445#M101997</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241218"&gt;@Kumar2&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;what do you mean with "discard"?&lt;/P&gt;&lt;P&gt;are you speaking of discard before indexing or discard at search time?&lt;/P&gt;&lt;P&gt;If you're speaking of discard before indexing, see SEDCMD command, for more infos see at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata#Anonymize_data_with_a_sed_script" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Data/Anonymizedata#Anonymize_data_with_a_sed_script&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you share some sample of your logs?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 10:40:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577445#M101997</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-12-06T10:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to discard extra text from a single line in events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577447#M101998</link>
      <description>&lt;P&gt;Discard at the Search time sir&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 10:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577447#M101998</guid>
      <dc:creator>Kumar2</dc:creator>
      <dc:date>2021-12-06T10:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to discard extra text from a single line in events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577449#M101999</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241218"&gt;@Kumar2&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you have a rule for the not displaying part (e.g. all after Except), you could create a regex like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "^(?&amp;lt;part_to_display&amp;gt;.*)Except"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to extract the part of _raw to display.&lt;/P&gt;&lt;P&gt;If you could share some sample I could help you more.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 11:06:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577449#M101999</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-12-06T11:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to discard extra text from a single line in events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577452#M102000</link>
      <description>&lt;P&gt;Eg: mynameisgautamkrishna .after extracting name=gautam .now I have to Delete everything Except Gautam and only name (Gautam) will display in events&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;mynameisgautamkrishna&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;After Ingest and Extract Name=Gautam&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Gautam should display in Events as well as in corresponding Interesting field (Name)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 11:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577452#M102000</guid>
      <dc:creator>Kumar2</dc:creator>
      <dc:date>2021-12-06T11:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to discard extra text from a single line in events?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577454#M102001</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241218"&gt;@Kumar2&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have to identify a rule to extract the field to display: e.g. take all after "mynameis".&lt;/P&gt;&lt;P&gt;In your sample, it's easy to understand where the field sarts but it's difficoult to understand where the field finishes:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "mynameis(?&amp;lt;name&amp;gt;\w+)"&lt;/LI-CODE&gt;&lt;P&gt;if the number of chars is fixed (e.g. 8), you could use something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "mynameis(?&amp;lt;name&amp;gt;\w{8})"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 11:30:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-discard-extra-text-from-a-single-line-in-events/m-p/577454#M102001</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-12-06T11:30:33Z</dc:date>
    </item>
  </channel>
</rss>

