<?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 remove everything after a specific character in a line in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288655#M161655</link>
    <description>&lt;P&gt;I sorry I am very new to splunk where should I put that option in the search?&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2020 18:53:20 GMT</pubDate>
    <dc:creator>sylinttest</dc:creator>
    <dc:date>2020-01-31T18:53:20Z</dc:date>
    <item>
      <title>How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288648#M161648</link>
      <description>&lt;P&gt;Currently i am not familiar with REx and replace commands in splunk. Can someone help me here &lt;BR /&gt;
i want to replace to blank anything after fullstop&lt;/P&gt;

&lt;P&gt;for ex :&lt;BR /&gt;
Username&lt;BR /&gt;
A1B1.;#12345&lt;/P&gt;

&lt;P&gt;;#12345 this character needs to be removed.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288648#M161648</guid>
      <dc:creator>rijinc</dc:creator>
      <dc:date>2017-03-27T06:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288649#M161649</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=Username mode=sed "s/\..*$//"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:45:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288649#M161649</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-27T06:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288650#M161650</link>
      <description>&lt;P&gt;Thanks Sir....it worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 06:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288650#M161650</guid>
      <dc:creator>rijinc</dc:creator>
      <dc:date>2017-03-27T06:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288651#M161651</link>
      <description>&lt;P&gt;i have got another requirement where &lt;/P&gt;

&lt;P&gt;for ex :&lt;BR /&gt;
Username&lt;BR /&gt;
Lynn Chriss H;#12345&lt;/P&gt;

&lt;P&gt;need to remove the values from full stop [;#12345] was tryin to use the above rex by interchanging some thing like this. It doesnt work ...&lt;BR /&gt;
| rex field="Username" mode=sed "s/[A-Z]*$//"&lt;BR /&gt;
?&lt;BR /&gt;
Request your help on this&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 09:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288651#M161651</guid>
      <dc:creator>rijinc</dc:creator>
      <dc:date>2017-03-27T09:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288652#M161652</link>
      <description>&lt;P&gt;Oh, I see, my original answer also removed the &lt;CODE&gt;.&lt;/CODE&gt; but you need to keep that, just do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rex field=Username mode=sed "s/\..*$/./"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Mar 2017 17:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288652#M161652</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-27T17:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288653#M161653</link>
      <description>&lt;P&gt;I have a similar issue, in the Message field from a specific event code from the WinEventLogs it says &lt;/P&gt;

&lt;P&gt;"A memeber was added to a security-enabled global group."&lt;BR /&gt;
Subject:&lt;BR /&gt;
             Security ID: &lt;/P&gt;

&lt;P&gt;I want everything after the period  "group." gone. I tried the above rex however nothing changed. &lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 21:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288653#M161653</guid>
      <dc:creator>sylinttest</dc:creator>
      <dc:date>2020-01-30T21:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288654#M161654</link>
      <description>&lt;P&gt;&lt;CODE&gt;(?s)&lt;/CODE&gt;&lt;BR /&gt;
try this option.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 09:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288654#M161654</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-31T09:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288655#M161655</link>
      <description>&lt;P&gt;I sorry I am very new to splunk where should I put that option in the search?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 18:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288655#M161655</guid>
      <dc:creator>sylinttest</dc:creator>
      <dc:date>2020-01-31T18:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288656#M161656</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="\"A memeber was added to a security-enabled global group.\"
Subject:
Security ID:"
 | rex mode=sed "s/(?s)\..*$/./"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cf. &lt;A href="https://regex101.com/"&gt;regex101&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2020 23:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288656#M161656</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-31T23:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove everything after a specific character in a line</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288657#M161657</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval _raw="\"A memeber was added to a security-enabled global group.\"
 Subject:
 Security ID:"
 | rex "\"(?&amp;lt;_raw&amp;gt;.+)\""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I will do it like this.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2020 00:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-everything-after-a-specific-character-in-a-line/m-p/288657#M161657</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-01T00:10:21Z</dc:date>
    </item>
  </channel>
</rss>

